Class: PerfectSched::Schedule
- Inherits:
-
Object
- Object
- PerfectSched::Schedule
- Includes:
- Model
- Defined in:
- lib/perfectsched/schedule.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#key ⇒ Object
readonly
Returns the value of attribute key.
Attributes included from Model
Instance Method Summary collapse
- #delete!(options = {}) ⇒ Object
- #exists?(options = {}) ⇒ Boolean
-
#initialize(client, key) ⇒ Schedule
constructor
A new instance of Schedule.
- #inspect ⇒ Object
- #metadata(options = {}) ⇒ Object
Methods included from Model
Constructor Details
#initialize(client, key) ⇒ Schedule
Returns a new instance of Schedule.
24 25 26 27 |
# File 'lib/perfectsched/schedule.rb', line 24 def initialize(client, key) super(client) @key = key end |
Instance Attribute Details
#key ⇒ Object (readonly)
Returns the value of attribute key.
29 30 31 |
# File 'lib/perfectsched/schedule.rb', line 29 def key @key end |
Instance Method Details
#delete!(options = {}) ⇒ Object
31 32 33 |
# File 'lib/perfectsched/schedule.rb', line 31 def delete!(={}) @client.delete(@key, ) end |
#exists?(options = {}) ⇒ Boolean
39 40 41 42 43 44 |
# File 'lib/perfectsched/schedule.rb', line 39 def exists?(={}) () true rescue NotFoundError false end |
#inspect ⇒ Object
46 47 48 |
# File 'lib/perfectsched/schedule.rb', line 46 def inspect "#<#{self.class} @key=#{@key.inspect}>" end |
#metadata(options = {}) ⇒ Object
35 36 37 |
# File 'lib/perfectsched/schedule.rb', line 35 def (={}) @client.(@key, ) end |