meteor 0.9.30 → 0.9.31

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -27,7 +27,7 @@ module Meteor
27
27
  # initializer (イニシャライザ)
28
28
  #
29
29
  def initialize_0
30
- @map = Hash.new
30
+ @map = {}
31
31
  @recordable = false
32
32
  end
33
33
 
@@ -86,9 +86,9 @@ module Meteor
86
86
  # @return [String] attribute value (属性値)
87
87
  #
88
88
  def fetch(name)
89
- if @map[name] && !@map[name].removed
90
- @map[name].value
91
- end
89
+ return unless @map[name] && !@map[name].removed
90
+
91
+ @map[name].value
92
92
  end
93
93
 
94
94
  #
@@ -96,10 +96,10 @@ module Meteor
96
96
  # @param name attribute name (属性名)
97
97
  #
98
98
  def delete(name)
99
- if @recordable && @map[name]
100
- @map[name].removed = true
101
- @map[name].changed = false
102
- end
99
+ return unless @recordable && @map[name]
100
+
101
+ @map[name].removed = true
102
+ @map[name].changed = false
103
103
  end
104
104
 
105
105
  #
@@ -107,9 +107,9 @@ module Meteor
107
107
  # @return [true,false] update flag of attribute (属性の変更状況)
108
108
  #
109
109
  def changed(name)
110
- if @map[name]
111
- @map[name].changed
112
- end
110
+ return unless @map[name]
111
+
112
+ @map[name].changed
113
113
  end
114
114
 
115
115
  #
@@ -117,13 +117,12 @@ module Meteor
117
117
  # @return [true,false] delete flag of attribute (属性の削除状況)
118
118
  #
119
119
  def removed(name)
120
- if @map[name]
121
- @map[name].removed
122
- end
120
+ return unless @map[name]
121
+
122
+ @map[name].removed
123
123
  end
124
124
 
125
- attr_accessor :map
126
- attr_accessor :recordable
125
+ attr_accessor :map, :recordable
127
126
 
128
127
  #
129
128
  # set a couple of attribute name and attribute value (属性名と属性値を対としてセットする)