Class: Gecko::Widget::Text::Item

Inherits:
Object
  • Object
show all
Defined in:
lib/gecko/widget/text.rb

Constant Summary collapse

TYPES =
{
  :normal => 0,
  :alert => 1,
  :info => 2
}

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(text = nil, type = :normal) ⇒ Item

Returns a new instance of Item.



15
16
17
18
# File 'lib/gecko/widget/text.rb', line 15

def initialize(text = nil, type = :normal)
  self.text = text
  self.type = type
end

Instance Attribute Details

#textObject

Returns the value of attribute text.



12
13
14
# File 'lib/gecko/widget/text.rb', line 12

def text
  @text
end

#typeObject

Returns the value of attribute type.



13
14
15
# File 'lib/gecko/widget/text.rb', line 13

def type
  @type
end