Class: Ship

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/exogenesis/support/ship.rb

Instance Method Summary collapse

Constructor Details

#initialize(raw_config) ⇒ Ship

Returns a new instance of Ship.



8
9
10
11
12
13
14
15
# File 'lib/exogenesis/support/ship.rb', line 8

def initialize(raw_config)
  config = OpenStruct.new(raw_config)
  @package_managers = []
  config.passengers.each do |passenger_name|
    passenger = Passenger.by_name(passenger_name).new(config)
    @package_managers << Spacesuit.new(passenger)
  end
end

Instance Method Details

#cleanObject



19
20
21
# File 'lib/exogenesis/support/ship.rb', line 19

def clean
  each(&:clean)
end

#downObject



27
28
29
# File 'lib/exogenesis/support/ship.rb', line 27

def down
  each(&:down)
end

#upObject



23
24
25
# File 'lib/exogenesis/support/ship.rb', line 23

def up
  each(&:up)
end