Class: Despecable::Spectator
- Inherits:
- BasicObject
- Defined in:
- lib/despecable/spectator.rb
Instance Attribute Summary collapse
-
#params ⇒ Object
readonly
Returns the value of attribute params.
-
#specd ⇒ Object
readonly
Returns the value of attribute specd.
Instance Method Summary collapse
- #any(name, options = {}) ⇒ Object
- #boolean(name, options = {}) ⇒ Object
- #date(name, options = {}) ⇒ Object
- #datetime(name, options = {}) ⇒ Object
- #file(name, options = {}) ⇒ Object
- #float(name, options = {}) ⇒ Object
-
#initialize(params) ⇒ Spectator
constructor
A new instance of Spectator.
- #integer(name, options = {}) ⇒ Object
- #string(name, options = {}) ⇒ Object
Constructor Details
#initialize(params) ⇒ Spectator
Returns a new instance of Spectator.
5 6 7 8 9 |
# File 'lib/despecable/spectator.rb', line 5 def initialize(params) @params = params @spectacles = ::Despecable::Spectacles.new @specd = [] end |
Instance Attribute Details
#params ⇒ Object (readonly)
Returns the value of attribute params.
3 4 5 |
# File 'lib/despecable/spectator.rb', line 3 def params @params end |
#specd ⇒ Object (readonly)
Returns the value of attribute specd.
3 4 5 |
# File 'lib/despecable/spectator.rb', line 3 def specd @specd end |
Instance Method Details
#any(name, options = {}) ⇒ Object
39 40 41 |
# File 'lib/despecable/spectator.rb', line 39 def any(name, = {}) _spec(name, :any, ) end |
#boolean(name, options = {}) ⇒ Object
19 20 21 |
# File 'lib/despecable/spectator.rb', line 19 def boolean(name, = {}) _spec(name, :boolean, ) end |
#date(name, options = {}) ⇒ Object
23 24 25 |
# File 'lib/despecable/spectator.rb', line 23 def date(name, = {}) _spec(name, :date, ) end |
#datetime(name, options = {}) ⇒ Object
27 28 29 |
# File 'lib/despecable/spectator.rb', line 27 def datetime(name, = {}) _spec(name, :datetime, ) end |
#file(name, options = {}) ⇒ Object
35 36 37 |
# File 'lib/despecable/spectator.rb', line 35 def file(name, = {}) _spec(name, :file, ) end |
#float(name, options = {}) ⇒ Object
31 32 33 |
# File 'lib/despecable/spectator.rb', line 31 def float(name, = {}) _spec(name, :float, ) end |
#integer(name, options = {}) ⇒ Object
11 12 13 |
# File 'lib/despecable/spectator.rb', line 11 def integer(name, = {}) _spec(name, :integer, ) end |
#string(name, options = {}) ⇒ Object
15 16 17 |
# File 'lib/despecable/spectator.rb', line 15 def string(name, = {}) _spec(name, :string, ) end |