Module: Shoes::Mod
Instance Attribute Summary collapse
-
#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.
Instance Method Summary collapse
Instance Attribute Details
#margin_bottom ⇒ Object (readonly)
Returns the value of attribute margin_bottom.
21 22 23 |
# File 'lib/shoes/helper_methods.rb', line 21 def margin_bottom @margin_bottom end |
#margin_left ⇒ Object (readonly)
Returns the value of attribute margin_left.
21 22 23 |
# File 'lib/shoes/helper_methods.rb', line 21 def margin_left @margin_left end |
#margin_right ⇒ Object (readonly)
Returns the value of attribute margin_right.
21 22 23 |
# File 'lib/shoes/helper_methods.rb', line 21 def margin_right @margin_right end |
#margin_top ⇒ Object (readonly)
Returns the value of attribute margin_top.
21 22 23 |
# File 'lib/shoes/helper_methods.rb', line 21 def margin_top @margin_top end |
Instance Method Details
#click(&blk) ⇒ Object
13 14 15 |
# File 'lib/shoes/helper_methods.rb', line 13 def click &blk @app.clickable self, :click, &blk end |
#release(&blk) ⇒ Object
17 18 19 |
# File 'lib/shoes/helper_methods.rb', line 17 def release &blk @app.clickable self, :release, &blk 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 |