Module: Shoes::Mod
Instance Attribute Summary collapse
-
#click_proc ⇒ Object
readonly
Returns the value of attribute click_proc.
-
#hover_proc ⇒ Object
readonly
Returns the value of attribute hover_proc.
-
#hovered ⇒ Object
Returns the value of attribute hovered.
-
#leave_proc ⇒ Object
readonly
Returns the value of attribute leave_proc.
-
#margin_bottom ⇒ Object
readonly
Returns the value of attribute margin_bottom.
-
#margin_left ⇒ Object
readonly
Returns the value of attribute margin_left.
-
#margin_right ⇒ Object
readonly
Returns the value of attribute margin_right.
-
#margin_top ⇒ Object
readonly
Returns the value of attribute margin_top.
-
#release_proc ⇒ Object
readonly
Returns the value of attribute release_proc.
Instance Method Summary collapse
- #click(&blk) ⇒ Object
- #hover(&blk) ⇒ Object
- #leave(&blk) ⇒ Object
- #release(&blk) ⇒ Object
- #set_margin ⇒ Object
Instance Attribute Details
#click_proc ⇒ Object (readonly)
Returns the value of attribute click_proc.
33 34 35 |
# File 'lib/shoes/helper_methods.rb', line 33 def click_proc @click_proc end |
#hover_proc ⇒ Object (readonly)
Returns the value of attribute hover_proc.
33 34 35 |
# File 'lib/shoes/helper_methods.rb', line 33 def hover_proc @hover_proc end |
#hovered ⇒ Object
Returns the value of attribute hovered.
34 35 36 |
# File 'lib/shoes/helper_methods.rb', line 34 def hovered @hovered end |
#leave_proc ⇒ Object (readonly)
Returns the value of attribute leave_proc.
33 34 35 |
# File 'lib/shoes/helper_methods.rb', line 33 def leave_proc @leave_proc end |
#margin_bottom ⇒ Object (readonly)
Returns the value of attribute margin_bottom.
33 34 35 |
# File 'lib/shoes/helper_methods.rb', line 33 def margin_bottom @margin_bottom end |
#margin_left ⇒ Object (readonly)
Returns the value of attribute margin_left.
33 34 35 |
# File 'lib/shoes/helper_methods.rb', line 33 def margin_left @margin_left end |
#margin_right ⇒ Object (readonly)
Returns the value of attribute margin_right.
33 34 35 |
# File 'lib/shoes/helper_methods.rb', line 33 def margin_right @margin_right end |
#margin_top ⇒ Object (readonly)
Returns the value of attribute margin_top.
33 34 35 |
# File 'lib/shoes/helper_methods.rb', line 33 def margin_top @margin_top end |
#release_proc ⇒ Object (readonly)
Returns the value of attribute release_proc.
33 34 35 |
# File 'lib/shoes/helper_methods.rb', line 33 def release_proc @release_proc end |
Instance Method Details
#click(&blk) ⇒ Object
13 14 15 16 |
# File 'lib/shoes/helper_methods.rb', line 13 def click &blk @click_proc = blk @app.mccs << self end |
#hover(&blk) ⇒ Object
23 24 25 26 |
# File 'lib/shoes/helper_methods.rb', line 23 def hover &blk @hover_proc = blk (@app.mhcs << self) unless @app.mhcs.include? self end |
#leave(&blk) ⇒ Object
28 29 30 31 |
# File 'lib/shoes/helper_methods.rb', line 28 def leave &blk @leave_proc = blk (@app.mhcs << self) unless @app.mhcs.include? self end |
#release(&blk) ⇒ Object
18 19 20 21 |
# File 'lib/shoes/helper_methods.rb', line 18 def release &blk @release_proc = blk @app.mrcs << self end |
#set_margin ⇒ Object
3 4 5 6 7 8 9 10 11 |
# File 'lib/shoes/helper_methods.rb', line 3 def set_margin @margin ||= [0, 0, 0, 0] @margin = [@margin, @margin, @margin, @margin] if @margin.is_a? Integer margin_left, margin_top, margin_right, margin_bottom = @margin @margin_left ||= margin_left @margin_top ||= margin_top @margin_right ||= margin_right @margin_bottom ||= margin_bottom end |