Class: Foshow
Constant Summary collapse
- VERSION =
"0.0.0"
Instance Attribute Summary collapse
-
#renderer ⇒ Object
Returns the value of attribute renderer.
-
#views ⇒ Object
Returns the value of attribute views.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#renderer ⇒ Object
Returns the value of attribute renderer.
10 11 12 |
# File 'lib/foshow.rb', line 10 def renderer @renderer end |
#views ⇒ Object
Returns the value of attribute views.
10 11 12 |
# File 'lib/foshow.rb', line 10 def views @views end |
Class Method Details
.configure {|instance.config| ... } ⇒ Object
12 13 14 |
# File 'lib/foshow.rb', line 12 def self.configure(&block) yield instance.config end |
.render(renderer) ⇒ Object
16 17 18 19 |
# File 'lib/foshow.rb', line 16 def self.render(renderer) instance.renderer = renderer instance.render end |
Instance Method Details
#config ⇒ Object
21 22 23 |
# File 'lib/foshow.rb', line 21 def config @config ||= OpenStruct.new end |
#render ⇒ Object
25 26 27 28 29 |
# File 'lib/foshow.rb', line 25 def render renderer.content_tag(:section, id: 'code_viewer') do + build_elements end.html_safe end |