Class: TusurCdn::Consumer
- Inherits:
-
Object
- Object
- TusurCdn::Consumer
- Defined in:
- lib/tusur_cdn/consumer.rb
Instance Attribute Summary collapse
-
#css ⇒ Object
Returns the value of attribute css.
-
#data ⇒ Object
Returns the value of attribute data.
-
#javascript ⇒ Object
Returns the value of attribute javascript.
-
#key ⇒ Object
Returns the value of attribute key.
-
#settings ⇒ Object
Returns the value of attribute settings.
-
#template ⇒ Object
Returns the value of attribute template.
Instance Method Summary collapse
- #get_data ⇒ Object
-
#initialize(key:) ⇒ Consumer
constructor
A new instance of Consumer.
Constructor Details
#initialize(key:) ⇒ Consumer
Returns a new instance of Consumer.
5 6 7 |
# File 'lib/tusur_cdn/consumer.rb', line 5 def initialize(key:) @key = key end |
Instance Attribute Details
#css ⇒ Object
Returns the value of attribute css.
3 4 5 |
# File 'lib/tusur_cdn/consumer.rb', line 3 def css @css end |
#data ⇒ Object
Returns the value of attribute data.
3 4 5 |
# File 'lib/tusur_cdn/consumer.rb', line 3 def data @data end |
#javascript ⇒ Object
Returns the value of attribute javascript.
3 4 5 |
# File 'lib/tusur_cdn/consumer.rb', line 3 def javascript @javascript end |
#key ⇒ Object
Returns the value of attribute key.
3 4 5 |
# File 'lib/tusur_cdn/consumer.rb', line 3 def key @key end |
#settings ⇒ Object
Returns the value of attribute settings.
3 4 5 |
# File 'lib/tusur_cdn/consumer.rb', line 3 def settings @settings end |
#template ⇒ Object
Returns the value of attribute template.
3 4 5 |
# File 'lib/tusur_cdn/consumer.rb', line 3 def template @template end |
Instance Method Details
#get_data ⇒ Object
9 10 11 12 |
# File 'lib/tusur_cdn/consumer.rb', line 9 def get_data consume_base result = Hashie::Mash.new METHOD_PREFIX.each_with_object({}){|mp, hash| hash[mp] = send "#{mp}"} end |