module ProMotion::Menu::Visibility
Public Class Methods
included(base)
click to toggle source
# File lib/ProMotion/menu/visibility.rb, line 34 def self.included(base) base.class_eval do alias_method :max_left_width, :maximumLeftDrawerWidth alias_method :max_right_width, :maximumRightDrawerWidth alias_method :max_left_width=, :setMaximumLeftDrawerWidth alias_method :max_right_width=, :setMaximumRightDrawerWidth end end
Public Instance Methods
hide(animated=true)
click to toggle source
# File lib/ProMotion/menu/visibility.rb, line 17 def hide(animated=true) closeDrawerAnimated animated, completion: default_completion_block end
show(side, animated=true)
click to toggle source
# File lib/ProMotion/menu/visibility.rb, line 4 def show(side, animated=true) self.show_left(animated) if side == :left self.show_right(animated) if side == :right end
show_left(animated=true)
click to toggle source
# File lib/ProMotion/menu/visibility.rb, line 9 def show_left(animated=true) openDrawerSide MMDrawerSideLeft, animated: animated, completion: default_completion_block end
show_right(animated=true)
click to toggle source
# File lib/ProMotion/menu/visibility.rb, line 13 def show_right(animated=true) openDrawerSide MMDrawerSideRight, animated: animated, completion: default_completion_block end
toggle(side, animated=true)
click to toggle source
# File lib/ProMotion/menu/visibility.rb, line 21 def toggle(side, animated=true) toggle_left(animated) if side == :left toggle_right(animated) if side == :right end
toggle_left(animated=true)
click to toggle source
# File lib/ProMotion/menu/visibility.rb, line 26 def toggle_left(animated=true) toggleDrawerSide MMDrawerSideLeft, animated: animated, completion: default_completion_block end
toggle_right(animated=true)
click to toggle source
# File lib/ProMotion/menu/visibility.rb, line 30 def toggle_right(animated=true) toggleDrawerSide MMDrawerSideRight, animated: animated, completion: default_completion_block end