Class: EveAPI::Base
- Inherits:
-
Object
show all
- Defined in:
- lib/eve-api/eve-api.rb
Direct Known Subclasses
Account, Character, CharacterSkills, Corporation, JournalEntry, Member, ReferenceType, Skill, SkillGroup, SkillInTraining, System, Transaction, User
Instance Method Summary
collapse
Constructor Details
#initialize(options, api = nil) ⇒ Base
39
40
41
42
43
|
# File 'lib/eve-api/eve-api.rb', line 39
def initialize(options, api=nil)
@api ||= api
@api ||= Transport::API.new(options)
@options = options
end
|
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method, *args) ⇒ Object
50
51
52
53
|
# File 'lib/eve-api/eve-api.rb', line 50
def method_missing(method, *args)
return(@options[method]) if @options.has_key?(method)
raise(Exceptions::AttributeException,"unknown attribute #{method}")
end
|
Instance Method Details
#id ⇒ Object
44
45
46
|
# File 'lib/eve-api/eve-api.rb', line 44
def id
return(@options[:id])
end
|
#type ⇒ Object
47
48
49
|
# File 'lib/eve-api/eve-api.rb', line 47
def type
return(@options[:type])
end
|