Class: Rackson::Property
- Inherits:
-
Object
- Object
- Rackson::Property
- Defined in:
- lib/rackson/property.rb
Instance Attribute Summary collapse
-
#klass ⇒ Object
readonly
Returns the value of attribute klass.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(name, klass, options) ⇒ Property
constructor
A new instance of Property.
- #required? ⇒ Boolean
Constructor Details
#initialize(name, klass, options) ⇒ Property
Returns a new instance of Property.
5 6 7 8 9 |
# File 'lib/rackson/property.rb', line 5 def initialize(name, klass, ) @name = name @klass = klass @options = end |
Instance Attribute Details
#klass ⇒ Object (readonly)
Returns the value of attribute klass.
3 4 5 |
# File 'lib/rackson/property.rb', line 3 def klass @klass end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
3 4 5 |
# File 'lib/rackson/property.rb', line 3 def name @name end |
Instance Method Details
#required? ⇒ Boolean
11 12 13 |
# File 'lib/rackson/property.rb', line 11 def required? !@options[:optional] end |