Class: Marley::ReggaeResource

Inherits:
Reggae show all
Defined in:
lib/marley/reggae.rb

Instance Attribute Summary

Attributes inherited from Reggae

#contents, #properties, #resource_type

Instance Method Summary collapse

Methods inherited from Reggae

#find_instances, get_resource, #is_resource?, mk_prop_methods, properties, #to_resource

Constructor Details

#initialize(*args) ⇒ ReggaeResource

Returns a new instance of ReggaeResource.



63
64
65
66
67
68
69
70
# File 'lib/marley/reggae.rb', line 63

def initialize(*args)
  @resource_type=self.class.to_s.sub(/.*Reggae/,'').underscore.to_sym
  if args[0].class==Hash
    initialize [@resource_type,args[0],args[1]]
  else
    super
  end
end

Instance Method Details

#update(vals) ⇒ Object



71
72
73
74
# File 'lib/marley/reggae.rb', line 71

def update(vals)
  self.properties.update(vals)
  self
end