Class: Property

Inherits:
Object
  • Object
show all
Defined in:
lib/sjScript.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#fieldObject

Returns the value of attribute field.



3
4
5
# File 'lib/sjScript.rb', line 3

def field
  @field
end

#typeObject

Returns the value of attribute type.



3
4
5
# File 'lib/sjScript.rb', line 3

def type
  @type
end

Instance Method Details

#to_sObject



9
10
11
# File 'lib/sjScript.rb', line 9

def to_s
    "type: #{type}, field: #{field}"
end