Class: Point::Zone
- Inherits:
-
Base
- Object
- Base
- Point::Zone
- Defined in:
- lib/point/zone.rb
Class Method Summary collapse
Instance Method Summary collapse
- #apply! ⇒ Object
- #build_record(attributes = {}) ⇒ Object
- #record(id) ⇒ Object
- #records ⇒ Object
- #requires_update? ⇒ Boolean
Class Method Details
.collection_path(params = {}) ⇒ Object
5 6 7 |
# File 'lib/point/zone.rb', line 5 def collection_path(params = {}) params[:group] ? "zones?group=#{params[:group]}" : 'zones' end |
Instance Method Details
#apply! ⇒ Object
10 11 12 13 |
# File 'lib/point/zone.rb', line 10 def apply! $stderr.puts "Zone information does not need to be applied manually. Point::Zone#apply! method will be deprecated soon." true end |
#build_record(attributes = {}) ⇒ Object
23 24 25 26 27 28 |
# File 'lib/point/zone.rb', line 23 def build_record(attributes = {}) z = ZoneRecord.new z.attributes = attributes if attributes.is_a?(Hash) z.zone = self z end |
#record(id) ⇒ Object
19 20 21 |
# File 'lib/point/zone.rb', line 19 def record(id) ZoneRecord.find(id, :zone => self) end |
#records ⇒ Object
15 16 17 |
# File 'lib/point/zone.rb', line 15 def records ZoneRecord.find(:all, :zone => self) end |
#requires_update? ⇒ Boolean
30 31 32 33 |
# File 'lib/point/zone.rb', line 30 def requires_update? $stderr.puts "Zone updated are applied immediately. Point::Zone#requires_update? will be deprecated soon." false end |