Class: Esi::Calls::Info

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name) ⇒ Info

Returns a new instance of Info.



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

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.



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

def call
  @call
end

#nameObject (readonly)

Returns the value of attribute name.



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

def name
  @name
end

Instance Method Details

#character?Boolean

Returns:

  • (Boolean)


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

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

#corporation?Boolean

Returns:

  • (Boolean)


26
27
28
# File 'lib/esi/calls.rb', line 26

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

#to_sObject



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

def to_s
  @name.to_s
end