Class: Esi::Calls::Info

Inherits:
Object
  • Object
show all
Defined in:
lib/esi/calls/info.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name) ⇒ Info

Returns a new instance of Info.



9
10
11
12
# File 'lib/esi/calls/info.rb', line 9

def initialize(name)
  @name = name.to_sym
  @call = Calls.const_get(name.to_s.camelize)
end

Instance Attribute Details

#callObject (readonly)

Returns the value of attribute call.



6
7
8
# File 'lib/esi/calls/info.rb', line 6

def call
  @call
end

#nameObject (readonly)

Returns the value of attribute name.



6
7
8
# File 'lib/esi/calls/info.rb', line 6

def name
  @name
end

Instance Method Details

#character?Boolean

Returns:

  • (Boolean)


18
19
20
# File 'lib/esi/calls/info.rb', line 18

def character?
  name.to_s.starts_with?('character')
end

#corporation?Boolean

Returns:

  • (Boolean)


22
23
24
# File 'lib/esi/calls/info.rb', line 22

def corporation?
  name.to_s.starts_with?('corporat')
end

#to_sObject



14
15
16
# File 'lib/esi/calls/info.rb', line 14

def to_s
  @name.to_s
end