Class: AccordionSection::Presenter

Inherits:
Object
  • Object
show all
Defined in:
lib/glimmer-dsl-web/samples/hello/hello_component_listeners.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#collapsedObject

Returns the value of attribute collapsed.



109
110
111
# File 'lib/glimmer-dsl-web/samples/hello/hello_component_listeners.rb', line 109

def collapsed
  @collapsed
end

#instant_transitionObject

Returns the value of attribute instant_transition.



109
110
111
# File 'lib/glimmer-dsl-web/samples/hello/hello_component_listeners.rb', line 109

def instant_transition
  @instant_transition
end

Instance Method Details

#collapse(instant: false) ⇒ Object



121
122
123
124
# File 'lib/glimmer-dsl-web/samples/hello/hello_component_listeners.rb', line 121

def collapse(instant: false)
  self.instant_transition = instant
  self.collapsed = true
end

#expand(instant: false) ⇒ Object



116
117
118
119
# File 'lib/glimmer-dsl-web/samples/hello/hello_component_listeners.rb', line 116

def expand(instant: false)
  self.instant_transition = instant
  self.collapsed = false
end

#toggle_collapsed(instant: false) ⇒ Object



111
112
113
114
# File 'lib/glimmer-dsl-web/samples/hello/hello_component_listeners.rb', line 111

def toggle_collapsed(instant: false)
  self.instant_transition = instant
  self.collapsed = !collapsed
end