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.



32
33
34
# File 'lib/html-renderer/base.rb', line 32

def initialize
  @list_order = :unordered
end

Instance Attribute Details

#list_orderObject

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