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.
32 33 34 |
# File 'lib/html-renderer/base.rb', line 32 def initialize @list_order = :unordered end |
Instance Attribute Details
#list_order ⇒ Object
Returns the value of attribute list_order.
30 31 32 |
# File 'lib/html-renderer/base.rb', line 30 def list_order @list_order end |
Instance Method Details
#with(opts = {}) ⇒ Object
36 37 38 39 40 |
# File 'lib/html-renderer/base.rb', line 36 def with(opts={}) newstate = dup opts.each { |k,v| newstate.send("#{k}=", v) } newstate end |