Class: ToFactory::Representation
- Inherits:
-
Object
- Object
- ToFactory::Representation
- Defined in:
- lib/to_factory/representation.rb
Instance Attribute Summary collapse
-
#definition ⇒ Object
Returns the value of attribute definition.
-
#hierarchy_order ⇒ Object
Returns the value of attribute hierarchy_order.
-
#klass ⇒ Object
Returns the value of attribute klass.
-
#name ⇒ Object
Returns the value of attribute name.
-
#parent_name ⇒ Object
Returns the value of attribute parent_name.
-
#record ⇒ Object
Returns the value of attribute record.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(name, parent_name, definition = nil, record = nil) ⇒ Representation
constructor
A new instance of Representation.
- #inspect ⇒ Object
- #klass_name_inspect ⇒ Object
Constructor Details
#initialize(name, parent_name, definition = nil, record = nil) ⇒ Representation
Returns a new instance of Representation.
10 11 12 13 |
# File 'lib/to_factory/representation.rb', line 10 def initialize(name, parent_name, definition=nil, record=nil) @name, @parent_name, @definition, @record = name.to_s, parent_name.to_s, definition, record end |
Instance Attribute Details
#definition ⇒ Object
Returns the value of attribute definition.
4 5 6 |
# File 'lib/to_factory/representation.rb', line 4 def definition @definition end |
#hierarchy_order ⇒ Object
Returns the value of attribute hierarchy_order.
4 5 6 |
# File 'lib/to_factory/representation.rb', line 4 def hierarchy_order @hierarchy_order end |
#klass ⇒ Object
Returns the value of attribute klass.
4 5 6 |
# File 'lib/to_factory/representation.rb', line 4 def klass @klass end |
#name ⇒ Object
Returns the value of attribute name.
4 5 6 |
# File 'lib/to_factory/representation.rb', line 4 def name @name end |
#parent_name ⇒ Object
Returns the value of attribute parent_name.
4 5 6 |
# File 'lib/to_factory/representation.rb', line 4 def parent_name @parent_name end |
#record ⇒ Object
Returns the value of attribute record.
4 5 6 |
# File 'lib/to_factory/representation.rb', line 4 def record @record end |
Class Method Details
.from(options) ⇒ Object
6 7 8 |
# File 'lib/to_factory/representation.rb', line 6 def self.from() OptionsParser.new().get_instance end |
Instance Method Details
#inspect ⇒ Object
15 16 17 |
# File 'lib/to_factory/representation.rb', line 15 def inspect "#<ToFactory::Representation:#{object_id} @name: #{@name.inspect}, @parent_name: #{@parent_name.inspect}, @klass: #{klass_name_inspect}>" end |
#klass_name_inspect ⇒ Object
19 20 21 |
# File 'lib/to_factory/representation.rb', line 19 def klass_name_inspect @klass.name.inspect rescue "nil" end |