Module: Eapi::Methods::Properties::ListInstanceMethods

Defined in:
lib/eapi/methods/properties.rb

Instance Method Summary collapse

Instance Method Details

#convert_value_for_element(value) ⇒ Object



163
164
165
# File 'lib/eapi/methods/properties.rb', line 163

def convert_value_for_element(value)
  convert_value(value, self.class.elements_defined_convert_with_for)
end

#prepare_value_for_element(value) ⇒ Object



167
168
169
170
171
172
173
174
175
# File 'lib/eapi/methods/properties.rb', line 167

def prepare_value_for_element(value)
  prepare_with = self.class.elements_defined_prepare_with_for

  if prepare_with
    convert_value(value, prepare_with)
  else
    value
  end
end

#set_value_in_final_array(array, value) ⇒ Object



149
150
151
152
153
# File 'lib/eapi/methods/properties.rb', line 149

def set_value_in_final_array(array, value)
  yield_final_value_for_elements(value) do |val|
    array << val
  end
end

#to_be_ignored?(value) ⇒ Boolean

Returns:

  • (Boolean)


159
160
161
# File 'lib/eapi/methods/properties.rb', line 159

def to_be_ignored?(value)
  Eapi::ValueIgnoreChecker.to_be_ignored? value, self.class.elements_ignore_definition
end

#yield_final_value_for_elements(value) {|convert_value_for_element(value)| ... } ⇒ Object

Yields:



155
156
157
# File 'lib/eapi/methods/properties.rb', line 155

def yield_final_value_for_elements(value)
  yield convert_value_for_element(value) unless to_be_ignored?(value)
end