Class: Zermelo::Associations::IndexData
- Inherits:
-
Object
- Object
- Zermelo::Associations::IndexData
- Defined in:
- lib/zermelo/associations/index_data.rb
Instance Attribute Summary collapse
-
#data_klass_name ⇒ Object
writeonly
Sets the attribute data_klass_name.
-
#index_klass ⇒ Object
Returns the value of attribute index_klass.
-
#name ⇒ Object
Returns the value of attribute name.
-
#type ⇒ Object
Returns the value of attribute type.
Instance Method Summary collapse
- #data_klass ⇒ Object
-
#initialize(opts = {}) ⇒ IndexData
constructor
A new instance of IndexData.
Constructor Details
#initialize(opts = {}) ⇒ IndexData
Returns a new instance of IndexData.
7 8 9 10 11 |
# File 'lib/zermelo/associations/index_data.rb', line 7 def initialize(opts = {}) [:name, :type, :index_klass].each do |a| send("#{a}=".to_sym, opts[a]) end end |
Instance Attribute Details
#data_klass_name=(value) ⇒ Object (writeonly)
Sets the attribute data_klass_name
4 5 6 |
# File 'lib/zermelo/associations/index_data.rb', line 4 def data_klass_name=(value) @data_klass_name = value end |
#index_klass ⇒ Object
Returns the value of attribute index_klass.
5 6 7 |
# File 'lib/zermelo/associations/index_data.rb', line 5 def index_klass @index_klass end |
#name ⇒ Object
Returns the value of attribute name.
5 6 7 |
# File 'lib/zermelo/associations/index_data.rb', line 5 def name @name end |
#type ⇒ Object
Returns the value of attribute type.
5 6 7 |
# File 'lib/zermelo/associations/index_data.rb', line 5 def type @type end |
Instance Method Details
#data_klass ⇒ Object
13 14 15 |
# File 'lib/zermelo/associations/index_data.rb', line 13 def data_klass @data_klass ||= @data_klass_name.constantize end |