Class: Ziya::Maps::Support::Range

Inherits:
Base show all
Defined in:
lib/ziya/maps/support/range.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#to_comp_yaml

Methods included from YamlHelpers::Gauges

#dial, #dials, #gauge

Methods included from YamlHelpers::Base

#clazz, #indent

Methods inherited from Charts::Support::Base

#==, attributes, #attributes_for, #configured?, has_attribute, #has_sub_components, #initialize, #merge, #options, #options_as_string

Constructor Details

This class inherits a constructor from Ziya::Charts::Support::Base

Class Method Details

.define_mappings(mappings) ⇒ Object



6
7
8
# File 'lib/ziya/maps/support/range.rb', line 6

def define_mappings( mappings )
  @mappings = mappings
end

.mappingsObject



10
11
12
# File 'lib/ziya/maps/support/range.rb', line 10

def mappings
  @mappings
end

Instance Method Details

#flatten(xml) ⇒ Object



18
19
20
21
22
# File 'lib/ziya/maps/support/range.rb', line 18

def flatten( xml )
  xml.state( :id => to_component_id ) do
    options.keys.sort { |a,b| a.to_s <=> b.to_s }.each { |k| self.class.module_eval "xml.#{find_key_for_attr(k)}( '#{options[k]}' )" }
  end
end