Sha256: cffbd2de20fed239cefbcc2d88974384bc69d90a0ee8c969108de3f845df95ad

Contents?: true

Size: 919 Bytes

Versions: 31

Compression:

Stored size: 919 Bytes

Contents

class Gillbus
  class Seat
    extend Fields
    include UpdateAttrs

    # seat id
    field :id

    field :number

    # Тип места.
    # 0 – пустое место, ячейка прохода.
    # 1 – место заказанное.
    # 2 – заблокированное.
    # 3 – свободное.
    # 4 – забронированное.
    # 5 – проданное.
    # 6 – место под спецбронью.
    # 7 – зарегистрированное.
    # 8 – место под технической бронью.
    # 9 – приоритетное место.
    # Продажи возможно осуществлять только на места типа «3» и «9»
    field :type, :int

    field :x, :int
    field :y, :int

    def free?
      type == 3 || type == 9
    end

    def isle?
      type == 0 || type.nil?
    end
  end
end

Version data entries

31 entries across 31 versions & 1 rubygems

Version Path
gillbus-0.20.6 lib/gillbus/structs/seat.rb
gillbus-0.20.5 lib/gillbus/structs/seat.rb
gillbus-0.20.4 lib/gillbus/structs/seat.rb
gillbus-0.20.3 lib/gillbus/structs/seat.rb
gillbus-0.20.2 lib/gillbus/structs/seat.rb
gillbus-0.20.1 lib/gillbus/structs/seat.rb
gillbus-0.20.0 lib/gillbus/structs/seat.rb
gillbus-0.19.0 lib/gillbus/structs/seat.rb
gillbus-0.18.14 lib/gillbus/structs/seat.rb
gillbus-0.18.13 lib/gillbus/structs/seat.rb
gillbus-0.18.12 lib/gillbus/structs/seat.rb
gillbus-0.18.11 lib/gillbus/structs/seat.rb
gillbus-0.18.10 lib/gillbus/structs/seat.rb
gillbus-0.18.9 lib/gillbus/structs/seat.rb
gillbus-0.18.8 lib/gillbus/structs/seat.rb
gillbus-0.18.7 lib/gillbus/structs/seat.rb
gillbus-0.18.6 lib/gillbus/structs/seat.rb
gillbus-0.18.5 lib/gillbus/structs/seat.rb
gillbus-0.18.4 lib/gillbus/structs/seat.rb
gillbus-0.18.3 lib/gillbus/structs/seat.rb