Class: Seatsio::ForSaleConfig
- Inherits:
-
Object
- Object
- Seatsio::ForSaleConfig
- Defined in:
- lib/seatsio/domain.rb
Instance Attribute Summary collapse
-
#area_places ⇒ Object
readonly
Returns the value of attribute area_places.
-
#categories ⇒ Object
readonly
Returns the value of attribute categories.
-
#for_sale ⇒ Object
readonly
Returns the value of attribute for_sale.
-
#objects ⇒ Object
readonly
Returns the value of attribute objects.
Class Method Summary collapse
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(for_sale, objects = nil, area_places = nil, categories = nil) ⇒ ForSaleConfig
constructor
A new instance of ForSaleConfig.
Constructor Details
#initialize(for_sale, objects = nil, area_places = nil, categories = nil) ⇒ ForSaleConfig
Returns a new instance of ForSaleConfig.
82 83 84 85 86 87 |
# File 'lib/seatsio/domain.rb', line 82 def initialize(for_sale, objects = nil, area_places = nil, categories = nil) @for_sale = for_sale @objects = objects @area_places = area_places @categories = categories end |
Instance Attribute Details
#area_places ⇒ Object (readonly)
Returns the value of attribute area_places.
80 81 82 |
# File 'lib/seatsio/domain.rb', line 80 def area_places @area_places end |
#categories ⇒ Object (readonly)
Returns the value of attribute categories.
80 81 82 |
# File 'lib/seatsio/domain.rb', line 80 def categories @categories end |
#for_sale ⇒ Object (readonly)
Returns the value of attribute for_sale.
80 81 82 |
# File 'lib/seatsio/domain.rb', line 80 def for_sale @for_sale end |
#objects ⇒ Object (readonly)
Returns the value of attribute objects.
80 81 82 |
# File 'lib/seatsio/domain.rb', line 80 def objects @objects end |
Class Method Details
.from_json(data) ⇒ Object
89 90 91 92 93 |
# File 'lib/seatsio/domain.rb', line 89 def self.from_json(data) if data ForSaleConfig.new(data['forSale'], data['objects'], data['areaPlaces'], data['categories']) end end |
Instance Method Details
#==(other) ⇒ Object
95 96 97 98 99 100 101 |
# File 'lib/seatsio/domain.rb', line 95 def == (other) other != nil && for_sale == other.for_sale && objects == other.objects && area_places == other.area_places && categories == other.categories end |