Class: Loveseat::Document::DSL
- Inherits:
-
Object
- Object
- Loveseat::Document::DSL
show all
- Defined in:
- lib/loveseat/document/dsl.rb
Instance Method Summary
collapse
Constructor Details
#initialize(support) ⇒ DSL
Returns a new instance of DSL.
4
5
6
|
# File 'lib/loveseat/document/dsl.rb', line 4
def initialize(support)
@support = support
end
|
Instance Method Details
#array(name, default = nil) ⇒ Object
32
33
34
|
# File 'lib/loveseat/document/dsl.rb', line 32
def array(name, default = nil)
@support.add_property(name, Property::Array, default)
end
|
#date(name, default = nil) ⇒ Object
20
21
22
|
# File 'lib/loveseat/document/dsl.rb', line 20
def date(name, default = nil)
@support.add_property(name, Property::Date, default)
end
|
#float(name, default = nil) ⇒ Object
16
17
18
|
# File 'lib/loveseat/document/dsl.rb', line 16
def float(name, default = nil)
@support.add_property(name, Property::Float, default)
end
|
#hash(name, default = nil) ⇒ Object
28
29
30
|
# File 'lib/loveseat/document/dsl.rb', line 28
def hash(name, default = nil)
@support.add_property(name, Property::Hash, default)
end
|
#integer(name, default = nil) ⇒ Object
8
9
10
|
# File 'lib/loveseat/document/dsl.rb', line 8
def integer(name, default = nil)
@support.add_property(name, Property::Integer, default)
end
|
#raw(name, default = nil) ⇒ Object
36
37
38
|
# File 'lib/loveseat/document/dsl.rb', line 36
def raw(name, default = nil)
@support.add_property(name, Property::Raw, default)
end
|
#string(name, default = nil) ⇒ Object
12
13
14
|
# File 'lib/loveseat/document/dsl.rb', line 12
def string(name, default = nil)
@support.add_property(name, Property::String, default)
end
|
#time(name, default = nil) ⇒ Object
24
25
26
|
# File 'lib/loveseat/document/dsl.rb', line 24
def time(name, default = nil)
@support.add_property(name, Property::Time, default)
end
|