Class: Shoes::Link
Instance Attribute Summary collapse
-
#index ⇒ Object
Returns the value of attribute index.
-
#link_hover ⇒ Object
Returns the value of attribute link_hover.
-
#link_proc ⇒ Object
readonly
Returns the value of attribute link_proc.
-
#pos ⇒ Object
Returns the value of attribute pos.
Attributes inherited from Text
Instance Method Summary collapse
-
#initialize(str, arg, &blk) ⇒ Link
constructor
A new instance of Link.
Constructor Details
#initialize(str, arg, &blk) ⇒ Link
Returns a new instance of Link.
50 51 52 53 54 55 56 57 58 59 60 61 62 63 |
# File 'lib/shoes/text.rb', line 50 def initialize str, arg, &blk @link_proc = if blk blk elsif arg[:click].is_a? String proc{Shoes.APPS.first.app.visit arg[:click]} elsif arg[:click].nil? proc{} else arg[:click] end @pos, @index, @link_hover = nil, nil, false super str end |
Instance Attribute Details
#index ⇒ Object
Returns the value of attribute index.
65 66 67 |
# File 'lib/shoes/text.rb', line 65 def index @index end |
#link_hover ⇒ Object
Returns the value of attribute link_hover.
65 66 67 |
# File 'lib/shoes/text.rb', line 65 def link_hover @link_hover end |
#link_proc ⇒ Object (readonly)
Returns the value of attribute link_proc.
64 65 66 |
# File 'lib/shoes/text.rb', line 64 def link_proc @link_proc end |
#pos ⇒ Object
Returns the value of attribute pos.
65 66 67 |
# File 'lib/shoes/text.rb', line 65 def pos @pos end |