Class: KalibroClient::Entities::Processor::KalibroModule
- Defined in:
- lib/kalibro_client/entities/processor/kalibro_module.rb
Instance Attribute Summary collapse
-
#granularity ⇒ Object
Returns the value of attribute granularity.
-
#id ⇒ Object
Returns the value of attribute id.
-
#long_name ⇒ Object
Returns the value of attribute long_name.
-
#module_result_id ⇒ Object
Returns the value of attribute module_result_id.
Attributes included from DateAttributes
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(attributes = {}, persisted = false) ⇒ KalibroModule
constructor
A new instance of KalibroModule.
- #name ⇒ Object
- #name=(value) ⇒ Object
- #short_name ⇒ Object
Methods inherited from Base
Methods inherited from Base
#==, create, create_array_from_hash, create_objects_array_from_hash, #destroy, exists?, find, request, #save, #save!, #to_hash, to_object, to_objects_array, #update
Methods included from RequestMethods::ClassMethods
#exists_action, #find_action, #id_params
Methods included from HashConverters
#convert_to_hash, #date_with_milliseconds, #field_to_hash
Methods included from XMLConverters
#get_xml, #xml_instance_class_name
Methods included from RequestMethods
#destroy_action, #destroy_params, #destroy_prefix, #save_action, #save_params, #save_prefix, #update_params, #update_prefix
Constructor Details
#initialize(attributes = {}, persisted = false) ⇒ KalibroModule
Returns a new instance of KalibroModule.
23 24 25 26 |
# File 'lib/kalibro_client/entities/processor/kalibro_module.rb', line 23 def initialize(attributes = {}, persisted = false) super @granularity = KalibroClient::Entities::Miscellaneous::Granularity.new attributes['granularity']['type'] end |
Instance Attribute Details
#granularity ⇒ Object
Returns the value of attribute granularity.
21 22 23 |
# File 'lib/kalibro_client/entities/processor/kalibro_module.rb', line 21 def granularity @granularity end |
#id ⇒ Object
Returns the value of attribute id.
21 22 23 |
# File 'lib/kalibro_client/entities/processor/kalibro_module.rb', line 21 def id @id end |
#long_name ⇒ Object
Returns the value of attribute long_name.
21 22 23 |
# File 'lib/kalibro_client/entities/processor/kalibro_module.rb', line 21 def long_name @long_name end |
#module_result_id ⇒ Object
Returns the value of attribute module_result_id.
21 22 23 |
# File 'lib/kalibro_client/entities/processor/kalibro_module.rb', line 21 def module_result_id @module_result_id end |
Instance Method Details
#name ⇒ Object
32 33 34 |
# File 'lib/kalibro_client/entities/processor/kalibro_module.rb', line 32 def name @long_name.split('.') end |
#name=(value) ⇒ Object
28 29 30 |
# File 'lib/kalibro_client/entities/processor/kalibro_module.rb', line 28 def name=(value) @long_name = (value.is_a?(Array) ? value.join('.') : value) end |
#short_name ⇒ Object
36 37 38 |
# File 'lib/kalibro_client/entities/processor/kalibro_module.rb', line 36 def short_name name.last end |