Class: WuParty::Entity

Inherits:
Object
  • Object
show all
Includes:
HTTParty
Defined in:
lib/wuparty.rb

Overview


Direct Known Subclasses

Form, Report, User

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(id, options) ⇒ Entity

Returns a new instance of Entity.



206
207
208
209
210
211
212
213
214
215
216
# File 'lib/wuparty.rb', line 206

def initialize(id, options)
  @id = id
  if options[:party]
    @party = options[:party]
  elsif options[:account] and options[:api_key]
    @party = WuParty.new(options[:account], options[:api_key])
  else
    raise WuParty::InitializationException, "You must either specify a :party object or pass the :account and :api_key options. Please see the README."
  end
  @details = options[:details]
end

Instance Attribute Details

#detailsObject

Returns the value of attribute details.



219
220
221
# File 'lib/wuparty.rb', line 219

def details
  @details
end

#idObject (readonly)

Returns the value of attribute id.



218
219
220
# File 'lib/wuparty.rb', line 218

def id
  @id
end