Class: ButterCMS::Resource
- Inherits:
-
Object
- Object
- ButterCMS::Resource
- Defined in:
- lib/butter_cms/resource.rb
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ Resource
constructor
A new instance of Resource.
Constructor Details
#initialize(attributes = {}) ⇒ Resource
Returns a new instance of Resource.
3 4 5 6 7 |
# File 'lib/butter_cms/resource.rb', line 3 def initialize(attributes = {}) attributes.each do |attr, value| define_singleton_method(attr) { attributes[attr] } end end |