Class: HTMLRenderer::State
- Inherits:
-
Object
- Object
- HTMLRenderer::State
- Defined in:
- lib/html-renderer/base.rb
Instance Attribute Summary collapse
-
#list_order ⇒ Object
Returns the value of attribute list_order.
Instance Method Summary collapse
-
#initialize ⇒ State
constructor
A new instance of State.
- #with(opts = {}) ⇒ Object
Constructor Details
#initialize ⇒ State
Returns a new instance of State.
27 28 29 |
# File 'lib/html-renderer/base.rb', line 27 def initialize @list_order = :unordered end |
Instance Attribute Details
#list_order ⇒ Object
Returns the value of attribute list_order.
25 26 27 |
# File 'lib/html-renderer/base.rb', line 25 def list_order @list_order end |
Instance Method Details
#with(opts = {}) ⇒ Object
31 32 33 34 35 |
# File 'lib/html-renderer/base.rb', line 31 def with(opts={}) newstate = dup opts.each { |k,v| newstate.send("#{k}=", v) } newstate end |