Class: Loveseat::Document::Property::Base
- Inherits:
-
Object
- Object
- Loveseat::Document::Property::Base
show all
- Defined in:
- lib/loveseat/document/property/base.rb
Instance Attribute Summary collapse
Instance Method Summary
collapse
Constructor Details
#initialize(default_value = nil) ⇒ Base
Returns a new instance of Base.
7
8
9
|
# File 'lib/loveseat/document/property/base.rb', line 7
def initialize(default_value = nil)
@value = cast(default_value)
end
|
Instance Attribute Details
#value ⇒ Object
Returns the value of attribute value.
5
6
7
|
# File 'lib/loveseat/document/property/base.rb', line 5
def value
@value
end
|
Instance Method Details
#empty? ⇒ Boolean
19
20
21
|
# File 'lib/loveseat/document/property/base.rb', line 19
def empty?
@value.nil?
end
|
#get ⇒ Object
11
12
13
|
# File 'lib/loveseat/document/property/base.rb', line 11
def get
@value
end
|
#set(value) ⇒ Object
15
16
17
|
# File 'lib/loveseat/document/property/base.rb', line 15
def set(value)
@value = cast(value)
end
|