Class: Sirens::MethodSourceCode

Inherits:
Component show all
Defined in:
lib/sirens/components/method_source_code.rb

Instance Method Summary collapse

Methods inherited from Component

#build, #create_view, #initialize, #main_child_component, #on_component_added, #open

Methods inherited from AbstractComponent

#add_all_components, #add_component, #child_components, #create_view, #default_model, #initialize, #model, #on_component_added, #on_model_changed, open, #props, #remove_component_at, #remove_last_component, #set_model, #set_props, #view

Constructor Details

This class inherits a constructor from Sirens::Component

Instance Method Details

#render_with(layout) ⇒ Object

Building



6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# File 'lib/sirens/components/method_source_code.rb', line 6

def render_with(layout)
    layout.render do |component|
        vertical_stack do
            text do
                model component.model.source_code
            end

            input_text do
                model component.model.location

                styles stack_expand: false
            end
        end
    end
end