Class: TusurCdn::Consumer

Inherits:
Object
  • Object
show all
Defined in:
lib/tusur_cdn/consumer.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#cssObject

Returns the value of attribute css.



3
4
5
# File 'lib/tusur_cdn/consumer.rb', line 3

def css
  @css
end

#dataObject

Returns the value of attribute data.



3
4
5
# File 'lib/tusur_cdn/consumer.rb', line 3

def data
  @data
end

#javascriptObject

Returns the value of attribute javascript.



3
4
5
# File 'lib/tusur_cdn/consumer.rb', line 3

def javascript
  @javascript
end

#keyObject

Returns the value of attribute key.



3
4
5
# File 'lib/tusur_cdn/consumer.rb', line 3

def key
  @key
end

#settingsObject

Returns the value of attribute settings.



3
4
5
# File 'lib/tusur_cdn/consumer.rb', line 3

def settings
  @settings
end

#templateObject

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_dataObject



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