Class: Property
- Inherits:
-
Object
- Object
- Property
- Defined in:
- lib/sjScript.rb
Instance Attribute Summary collapse
-
#field ⇒ Object
Returns the value of attribute field.
-
#type ⇒ Object
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(type:, field:) ⇒ Property
constructor
A new instance of Property.
- #to_s ⇒ Object
Constructor Details
#initialize(type:, field:) ⇒ Property
Returns a new instance of Property.
5 6 7 |
# File 'lib/sjScript.rb', line 5 def initialize(type:, field:) @type, @field = type, field end |
Instance Attribute Details
#field ⇒ Object
Returns the value of attribute field.
3 4 5 |
# File 'lib/sjScript.rb', line 3 def field @field end |
#type ⇒ Object
Returns the value of attribute type.
3 4 5 |
# File 'lib/sjScript.rb', line 3 def type @type end |
Instance Method Details
#to_s ⇒ Object
9 10 11 |
# File 'lib/sjScript.rb', line 9 def to_s "type: #{type}, field: #{field}" end |