Sha256: 0e559ff3c1eae4278774eb6dd20d9df2479059e7936287f3a93726357758e825

Contents?: true

Size: 389 Bytes

Versions: 4

Compression:

Stored size: 389 Bytes

Contents

module Spektrix
  module Seating
    class Plan
      include Spektrix::Base
      collection_path "plans"

      def to_s
        name
      end

      def all
        @all ||= all(all: true)
      end

      # The API doesn't allow you to filter by band_id, so we get all and find() in ruby
      def self.find(id)
        all.to_a.find {|b| b.id.to_i == id}
      end

    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
spektrix-0.0.2.5 lib/models/seating/plan.rb
spektrix-0.0.2.4 lib/models/seating/plan.rb
spektrix-0.0.2.3 lib/models/seating/plan.rb
spektrix-0.0.2.1 lib/models/seating/plan.rb