Class: Ziya::Gauges::Thermo

Inherits:
Base
  • Object
show all
Defined in:
lib/ziya/gauges/thermo.rb

Instance Attribute Summary

Attributes inherited from Base

#components, #design_id, #license, #options, #type

Instance Method Summary collapse

Methods inherited from Base

#to_xml

Methods included from Helpers::BaseHelper

#chart, #chart_url, #clazz, #component, #dial, #dials, #drawing, #gauge, #indent

Methods included from Utils::Text

#camelize, #classify, #demodulize, #underscore

Methods included from Helper

#block_is_within_action_view?, #capture_block, #chart_path, #charts_swf, #class_id, #codebase, #composite_url, #content_tag, #content_tag_string, #escape_chars, #escape_once, #escape_url, #gauge_path, #gauges_swf, #gen_composite_path, #gen_swf_path, #generate_flash_tag, #generate_old_style_flash_tag, #mime, #plugin_url, #setup_movie_size, #setup_wmode, #tag, #tag_options, #ziya_chart, #ziya_chart_js, #ziya_gauge, #ziya_javascript_include_tag

Constructor Details

#initialize(license, design_id = "thermo") ⇒ Thermo

creates a thermometer gauge. license the xml/swf gauge license key design_id the name of the design file containing components to override default design.



15
16
17
# File 'lib/ziya/gauges/thermo.rb', line 15

def initialize( license, design_id="thermo" )
  super( license, design_id )
end

Instance Method Details

#set_preferences(opts = {}) ⇒ Object


provides for overiding basic functionality

title

String representing gauge title or null for none.

gauge_color

Legend color

legend_color

Gauge color

due_point

Set temperature level



26
27
28
29
# File 'lib/ziya/gauges/thermo.rb', line 26

def set_preferences( opts={} )
  super( opts )
  options[:end_scale] = normalize_and_scale( options[:due_point] )
end