Class: JSON2Ruby::Primitive
- Inherits:
-
Object
- Object
- JSON2Ruby::Primitive
- Defined in:
- lib/json2ruby/primitive.rb
Instance Attribute Summary collapse
-
#attr_hash ⇒ Object
Returns the value of attribute attr_hash.
-
#name ⇒ Object
Returns the value of attribute name.
-
#original_name ⇒ Object
Returns the value of attribute original_name.
Class Method Summary collapse
Instance Method Summary collapse
- #comment ⇒ Object
-
#initialize(name, attr_hash) ⇒ Primitive
constructor
A new instance of Primitive.
Constructor Details
#initialize(name, attr_hash) ⇒ Primitive
Returns a new instance of Primitive.
10 11 12 13 |
# File 'lib/json2ruby/primitive.rb', line 10 def initialize(name, attr_hash) @name = name @attr_hash = attr_hash end |
Instance Attribute Details
#attr_hash ⇒ Object
Returns the value of attribute attr_hash.
4 5 6 |
# File 'lib/json2ruby/primitive.rb', line 4 def attr_hash @attr_hash end |
#name ⇒ Object
Returns the value of attribute name.
4 5 6 |
# File 'lib/json2ruby/primitive.rb', line 4 def name @name end |
#original_name ⇒ Object
Returns the value of attribute original_name.
4 5 6 |
# File 'lib/json2ruby/primitive.rb', line 4 def original_name @original_name end |
Class Method Details
.short_name ⇒ Object
6 7 8 |
# File 'lib/json2ruby/primitive.rb', line 6 def self.short_name "Primitive" end |
Instance Method Details
#comment ⇒ Object
19 20 21 |
# File 'lib/json2ruby/primitive.rb', line 19 def comment @name end |