Class: Locomotive::Steam::Snippet
- Inherits:
-
Object
- Object
- Locomotive::Steam::Snippet
- Includes:
- Models::Entity
- Defined in:
- lib/locomotive/steam/entities/snippet.rb
Instance Attribute Summary
Attributes included from Models::Entity
#associations, #attributes, #base_url, #localized_attributes
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ Snippet
constructor
A new instance of Snippet.
- #source ⇒ Object
Methods included from Models::Entity
#[], #[]=, #_id, #change, #method_missing, #respond_to?, #serialize
Methods included from Models::Concerns::ToJson
Methods included from Models::Concerns::Validation
Constructor Details
#initialize(attributes = {}) ⇒ Snippet
Returns a new instance of Snippet.
7 8 9 10 11 12 |
# File 'lib/locomotive/steam/entities/snippet.rb', line 7 def initialize(attributes = {}) super({ template: nil, source: nil }.merge(attributes)) end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Locomotive::Steam::Models::Entity
Instance Method Details
#source ⇒ Object
14 15 16 |
# File 'lib/locomotive/steam/entities/snippet.rb', line 14 def source self[:template] end |