Module: RemoteResource::Concerns::Attributes::ClassMethods

Defined in:
lib/remote_resource/concerns/attributes.rb

Instance Method Summary collapse

Instance Method Details

#attr_accessor(*vars) ⇒ Object



17
18
19
20
# File 'lib/remote_resource/concerns/attributes.rb', line 17

def attr_accessor(*vars)
  @attributes = (@attributes || []) + vars
  super
end

#attributesObject



22
23
24
# File 'lib/remote_resource/concerns/attributes.rb', line 22

def attributes
  Hash[(@attributes || []).map{|e| [e, nil]}]
end