Class: Ziya::Gauges::Base
- Inherits:
-
Object
- Object
- Ziya::Gauges::Base
- Includes:
- HtmlHelpers::Gauges, YamlHelpers::Gauges
- 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 YamlHelpers::Gauges
Methods included from YamlHelpers::Base
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) ⇒ Base
Returns a new instance of Base.
14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/ziya/gauges/base.rb', line 14 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.debug( ">>> 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.
11 12 13 |
# File 'lib/ziya/gauges/base.rb', line 11 def components @components end |
#design_id ⇒ Object
Returns the value of attribute design_id.
10 11 12 |
# File 'lib/ziya/gauges/base.rb', line 10 def design_id @design_id end |
#license ⇒ Object
Returns the value of attribute license.
10 11 12 |
# File 'lib/ziya/gauges/base.rb', line 10 def license @license end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
12 13 14 |
# File 'lib/ziya/gauges/base.rb', line 12 def @options end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
11 12 13 |
# File 'lib/ziya/gauges/base.rb', line 11 def type @type end |
Instance Method Details
#set_preferences(opts = {}) ⇒ Object
provides for overiding basic functionality
gauge_color
-
Legend color
legend_color
-
Gauge color
31 32 33 |
# File 'lib/ziya/gauges/base.rb', line 31 def set_preferences( opts={} ) .merge!( opts ) end |
#to_xml ⇒ Object
render gauge to xml
37 38 39 |
# File 'lib/ziya/gauges/base.rb', line 37 def to_xml render_xml end |