Class: PulseMeter::Visualize::DSL::Widget

Inherits:
Base
  • Object
show all
Defined in:
lib/pulse-meter/visualize/dsl/widget.rb

Constant Summary collapse

MAX_WIDTH =
10

Instance Method Summary collapse

Methods inherited from Base

array_extender, bool_setter, #create_dsl_obj, data_class, data_class=, deprecated_setter, dsl_array_extender, dsl_setter, #extract_params, hash_extender, int_setter, #process_args, setter, string_setter, #to_data

Methods included from Mixins::Utils

#assert_array!, #assert_positive_integer!, #assert_ranged_float!, #camelize, #camelize_keys, #constantize, #each_subset, #parse_time, #subsets_of, #symbolize_keys, #titleize, #uniqid

Constructor Details

#initialize(title) ⇒ Widget

Returns a new instance of Widget.



9
10
11
12
13
# File 'lib/pulse-meter/visualize/dsl/widget.rb', line 9

def initialize(title)
  super()
  self.title(title)
  self.width(MAX_WIDTH)
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(name, value) ⇒ Object



29
30
31
# File 'lib/pulse-meter/visualize/dsl/widget.rb', line 29

def method_missing(name, value)
  gchart_options(name => value)
end