Class: Sepa::StringWithConstraint
- Inherits:
-
Object
- Object
- Sepa::StringWithConstraint
show all
- Defined in:
- lib/sepa/base.rb
Instance Attribute Summary collapse
Instance Method Summary
collapse
Constructor Details
6
7
8
|
# File 'lib/sepa/base.rb', line 6
def initialize s
self.string = constrain s
end
|
Instance Attribute Details
#string ⇒ Object
Returns the value of attribute string.
4
5
6
|
# File 'lib/sepa/base.rb', line 4
def string
@string
end
|
Instance Method Details
#empty? ⇒ Boolean
10
11
12
|
# File 'lib/sepa/base.rb', line 10
def empty?
(self.string == nil) || (self.string == '')
end
|
#to_s ⇒ Object
14
15
16
|
# File 'lib/sepa/base.rb', line 14
def to_s
self.string
end
|