Class: Despecable::Spectator

Inherits:
BasicObject
Defined in:
lib/despecable/spectator.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#paramsObject (readonly)

Returns the value of attribute params.



3
4
5
# File 'lib/despecable/spectator.rb', line 3

def params
  @params
end

#specdObject (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, options = {})
  _spec(name, :any, options)
end

#boolean(name, options = {}) ⇒ Object



19
20
21
# File 'lib/despecable/spectator.rb', line 19

def boolean(name, options = {})
  _spec(name, :boolean, options)
end

#date(name, options = {}) ⇒ Object



23
24
25
# File 'lib/despecable/spectator.rb', line 23

def date(name, options = {})
  _spec(name, :date, options)
end

#datetime(name, options = {}) ⇒ Object



27
28
29
# File 'lib/despecable/spectator.rb', line 27

def datetime(name, options = {})
  _spec(name, :datetime, options)
end

#file(name, options = {}) ⇒ Object



35
36
37
# File 'lib/despecable/spectator.rb', line 35

def file(name, options = {})
  _spec(name, :file, options)
end

#float(name, options = {}) ⇒ Object



31
32
33
# File 'lib/despecable/spectator.rb', line 31

def float(name, options = {})
  _spec(name, :float, options)
end

#integer(name, options = {}) ⇒ Object



11
12
13
# File 'lib/despecable/spectator.rb', line 11

def integer(name, options = {})
  _spec(name, :integer, options)
end

#string(name, options = {}) ⇒ Object



15
16
17
# File 'lib/despecable/spectator.rb', line 15

def string(name, options = {})
  _spec(name, :string, options)
end