Class: AmsLayout::Parser::Control

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(label, id, type) ⇒ Control

Returns a new instance of Control.



111
112
113
114
115
# File 'lib/ams_layout/parser.rb', line 111

def initialize label, id, type
  @label = label
  @id = id
  @type = type
end

Instance Attribute Details

#idObject (readonly)

Returns the value of attribute id.



109
110
111
# File 'lib/ams_layout/parser.rb', line 109

def id
  @id
end

#labelObject (readonly)

Returns the value of attribute label.



109
110
111
# File 'lib/ams_layout/parser.rb', line 109

def label
  @label
end

#typeObject (readonly)

Returns the value of attribute type.



109
110
111
# File 'lib/ams_layout/parser.rb', line 109

def type
  @type
end

Instance Method Details

#to_hashObject



117
118
119
# File 'lib/ams_layout/parser.rb', line 117

def to_hash
  {label: @label, id: @id, type: @type}
end