Class: Gecko::Widget::NumberSecondaryStat

Inherits:
Gecko::Widget show all
Defined in:
lib/gecko/widget/number_secondary_stat.rb

Instance Attribute Summary collapse

Attributes inherited from Gecko::Widget

#data, #keys

Instance Method Summary collapse

Methods inherited from Gecko::Widget

#config, #config!, #initialize, #on_update, #payload, #push_requests, #push_url, #update

Constructor Details

This class inherits a constructor from Gecko::Widget

Instance Attribute Details

#absoluteObject

Returns the value of attribute absolute.



4
5
6
# File 'lib/gecko/widget/number_secondary_stat.rb', line 4

def absolute
  @absolute
end

#primary_prefixObject

Returns the value of attribute primary_prefix.



4
5
6
# File 'lib/gecko/widget/number_secondary_stat.rb', line 4

def primary_prefix
  @primary_prefix
end

#primary_textObject

Returns the value of attribute primary_text.



4
5
6
# File 'lib/gecko/widget/number_secondary_stat.rb', line 4

def primary_text
  @primary_text
end

#primary_valueObject

Returns the value of attribute primary_value.



4
5
6
# File 'lib/gecko/widget/number_secondary_stat.rb', line 4

def primary_value
  @primary_value
end

#secondary_prefixObject

Returns the value of attribute secondary_prefix.



4
5
6
# File 'lib/gecko/widget/number_secondary_stat.rb', line 4

def secondary_prefix
  @secondary_prefix
end

#secondary_textObject

Returns the value of attribute secondary_text.



4
5
6
# File 'lib/gecko/widget/number_secondary_stat.rb', line 4

def secondary_text
  @secondary_text
end

#secondary_valueObject

Returns the value of attribute secondary_value.



4
5
6
# File 'lib/gecko/widget/number_secondary_stat.rb', line 4

def secondary_value
  @secondary_value
end

#typeObject

Returns the value of attribute type.



4
5
6
# File 'lib/gecko/widget/number_secondary_stat.rb', line 4

def type
  @type
end

Instance Method Details

#data_payloadObject



6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# File 'lib/gecko/widget/number_secondary_stat.rb', line 6

def data_payload
  {:item =>
    [{
     :text => self.primary_text,
     :value => self.primary_value,
     :prefix => self.primary_prefix
   }, {
     :text => self.secondary_text,
     :value => self.secondary_value,
     :prefix => self.secondary_prefix
   }],
   :absolute => self.absolute,
   :type => self.type
  }
end