Class: Ziya::Gauges::Base
- Inherits:
-
Object
- Object
- Ziya::Gauges::Base
- Includes:
- Helpers::BaseHelper
- Defined in:
- lib/ziya/gauges/base.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#components ⇒ Object
readonly
Returns the value of attribute components.
-
#design_id ⇒ Object
Returns the value of attribute design_id.
-
#license ⇒ Object
Returns the value of attribute license.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(license, design_id) ⇒ Base
constructor
A new instance of Base.
-
#set_preferences(opts = {}) ⇒ Object
————————————————————————- provides for overiding basic functionality.
-
#to_xml ⇒ Object
————————————————————————- render gauge 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) ⇒ Base
Returns a new instance of Base.
9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/ziya/gauges/base.rb', line 9 def initialize( license, design_id ) @license = license @design_id = design_id # load up associated helper loaded = load_helper( Ziya.helpers_dir ) if Ziya.helpers_dir Ziya.logger.warn( ">>> ZiYa -- no helper for gauge `#{design_id}" ) unless loaded # init defaults @options = end |
Instance Attribute Details
#components ⇒ Object (readonly)
Returns the value of attribute components.
6 7 8 |
# File 'lib/ziya/gauges/base.rb', line 6 def components @components end |
#design_id ⇒ Object
Returns the value of attribute design_id.
5 6 7 |
# File 'lib/ziya/gauges/base.rb', line 5 def design_id @design_id end |
#license ⇒ Object
Returns the value of attribute license.
5 6 7 |
# File 'lib/ziya/gauges/base.rb', line 5 def license @license end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
7 8 9 |
# File 'lib/ziya/gauges/base.rb', line 7 def @options end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
6 7 8 |
# File 'lib/ziya/gauges/base.rb', line 6 def type @type end |
Instance Method Details
#set_preferences(opts = {}) ⇒ Object
provides for overiding basic functionality
gauge_color-
Legend color
legend_color-
Gauge color
26 27 28 |
# File 'lib/ziya/gauges/base.rb', line 26 def set_preferences( opts={} ) .merge!( opts ) end |
#to_xml ⇒ Object
render gauge to xml
32 33 34 |
# File 'lib/ziya/gauges/base.rb', line 32 def to_xml render_xml end |