Class: CartoCSSHelper::TagRenderingStatus
- Inherits:
-
Object
- Object
- CartoCSSHelper::TagRenderingStatus
- Defined in:
- lib/cartocss_helper/tag_lister.rb
Instance Attribute Summary collapse
-
#composite ⇒ Object
Returns the value of attribute composite.
-
#key ⇒ Object
Returns the value of attribute key.
-
#state ⇒ Object
Returns the value of attribute state.
-
#value ⇒ Object
Returns the value of attribute value.
Instance Method Summary collapse
- #code_print ⇒ Object
-
#initialize(key, value, state, composite = nil) ⇒ TagRenderingStatus
constructor
A new instance of TagRenderingStatus.
- #print ⇒ Object
Constructor Details
#initialize(key, value, state, composite = nil) ⇒ TagRenderingStatus
Returns a new instance of TagRenderingStatus.
11 12 13 14 15 16 |
# File 'lib/cartocss_helper/tag_lister.rb', line 11 def initialize(key, value, state, composite = nil) @key = key @value = value @state = state @composite = composite end |
Instance Attribute Details
#composite ⇒ Object
Returns the value of attribute composite.
10 11 12 |
# File 'lib/cartocss_helper/tag_lister.rb', line 10 def composite @composite end |
#key ⇒ Object
Returns the value of attribute key.
10 11 12 |
# File 'lib/cartocss_helper/tag_lister.rb', line 10 def key @key end |
#state ⇒ Object
Returns the value of attribute state.
10 11 12 |
# File 'lib/cartocss_helper/tag_lister.rb', line 10 def state @state end |
#value ⇒ Object
Returns the value of attribute value.
10 11 12 |
# File 'lib/cartocss_helper/tag_lister.rb', line 10 def value @value end |
Instance Method Details
#code_print ⇒ Object
26 27 28 29 30 31 |
# File 'lib/cartocss_helper/tag_lister.rb', line 26 def code_print string = "Status.new('#{@key}', '#{@value}', :#{@state}" string << ", #{@composite}" if @composite != nil string << '),' puts string end |
#print ⇒ Object
18 19 20 21 22 23 24 |
# File 'lib/cartocss_helper/tag_lister.rb', line 18 def print composite_string = '' if composite composite_string = "- rendered with #{@composite.to_s.gsub('=>', '=')}, maybe also other sets of tags" end puts "#{@key}=#{@value} #{@state} #{composite_string}" end |