class Sirens::Splitter
Public Class Methods
horizontal(props = Hash[])
click to toggle source
# File lib/components/containers/splitter.rb, line 10 def horizontal(props = Hash[]) props[:orientation] = :horizontal self.new(props) end
vertical(props = Hash[])
click to toggle source
# File lib/components/containers/splitter.rb, line 16 def vertical(props = Hash[]) props[:orientation] = :vertical self.new(props) end
Public Instance Methods
create_view()
click to toggle source
Returns a SplitterView
.
# File lib/components/containers/splitter.rb, line 34 def create_view() SplitterView.new( orientation: orientation ) end
on_component_added(child_component)
click to toggle source
Calls superclass method
# File lib/components/containers/splitter.rb, line 23 def on_component_added(child_component) splitter_proportion = child_component.props.fetch(:splitter_proportion) child_component.view.set_attribute(:splitter_proportion, splitter_proportion) super(child_component) end
orientation()
click to toggle source
Asking
# File lib/components/containers/splitter.rb, line 42 def orientation() props.fetch(:orientation) end