Class: GatherContent::Api::Template
- Defined in:
- lib/gather_content/api/template.rb
Instance Attribute Summary collapse
-
#template_id ⇒ Object
Returns the value of attribute template_id.
Instance Method Summary collapse
- #[](key) ⇒ Object
-
#initialize(template_id, data = nil) ⇒ Template
constructor
A new instance of Template.
Methods inherited from Base
#fetch, #get, #post, #post_json, #reset
Constructor Details
#initialize(template_id, data = nil) ⇒ Template
Returns a new instance of Template.
6 7 8 9 10 |
# File 'lib/gather_content/api/template.rb', line 6 def initialize(template_id, data = nil) raise ArgumentError, "Template_id is required!" if template_id.nil? @template_id = template_id @data = data end |
Instance Attribute Details
#template_id ⇒ Object
Returns the value of attribute template_id.
4 5 6 |
# File 'lib/gather_content/api/template.rb', line 4 def template_id @template_id end |
Instance Method Details
#[](key) ⇒ Object
12 13 14 |
# File 'lib/gather_content/api/template.rb', line 12 def [](key) fetch[key] end |