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 YamlHelpers::Gauges

#dial, #dials, #gauge

Methods included from YamlHelpers::Base

#clazz, #indent

Methods included from HtmlHelpers::Gauges

#_ziya_gauge, #class_id, #codebase, #default_gauge_options, #gauge_path, #gauges_swf, #ziya_gauge

Methods included from HtmlHelpers::Base

#escape_chars, #escape_once, #escape_url, #mime, #plugin_url, #setup_movie_size, #setup_wmode, #tag_options, #ziya_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