Class: HandyToolbox::MenuBack

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

Constant Summary collapse

TEXT =
'..'.freeze
ICON =
'<- '.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(parent) ⇒ MenuBack

Returns a new instance of MenuBack.



10
11
12
13
# File 'lib/handy_toolbox/menu_back.rb', line 10

def initialize(parent)
  @id = Ids::BACK
  @parent = parent
end

Instance Attribute Details

#idObject (readonly)

Returns the value of attribute id.



8
9
10
# File 'lib/handy_toolbox/menu_back.rb', line 8

def id
  @id
end

#parentObject (readonly)

Returns the value of attribute parent.



8
9
10
# File 'lib/handy_toolbox/menu_back.rb', line 8

def parent
  @parent
end

Instance Method Details

#iconObject



19
20
21
# File 'lib/handy_toolbox/menu_back.rb', line 19

def icon
  ICON
end

#to_sObject



15
16
17
# File 'lib/handy_toolbox/menu_back.rb', line 15

def to_s
  TEXT
end