Class: HTMLRenderer::State

Inherits:
Object
  • Object
show all
Defined in:
lib/html-renderer/base.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeState

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_orderObject

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