Sha256: 57453febcce3a8f870ec27f76d657377553daca7e7e04e1c905121fe9d2fb9af

Contents?: true

Size: 384 Bytes

Versions: 1

Compression:

Stored size: 384 Bytes

Contents

class Navy::Officer < Navy::Rank
  attr_accessor :number
  attr_reader :captain, :job
  def initialize(captain, number, job)
    @captain, @number, @job = captain, number, job
  end

  def ==(other_number)
    @number == other_number
  end

  def start
    proc_name "(#{captain.label}) officer[#{number}]"
    job.call
  rescue => e
    logger.error(e) rescue nil
    exit!
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
navy-0.0.1 lib/navy/officer.rb