Class: ButterCMS::Resource

Inherits:
Object
  • Object
show all
Defined in:
lib/butter_cms/resource.rb

Direct Known Subclasses

Author, Category, Post, Tag

Instance Method Summary collapse

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