Class: Protor::Entry
- Inherits:
-
Object
- Object
- Protor::Entry
- Defined in:
- lib/protor/entry.rb
Constant Summary collapse
- VALID_NAME =
/^[a-zA-Z_:][a-zA-Z0-9_:]+$/- VALID_TYPE =
[:c, :g, :h]
- VALID_LABEL_NAME =
/^[a-zA-Z_][a-zA-Z0-9_]*$/- VALID_LABEL_VALUE =
/^[^;|=]+$/
Instance Attribute Summary collapse
-
#additional ⇒ Object
readonly
Returns the value of attribute additional.
-
#labels ⇒ Object
readonly
Returns the value of attribute labels.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
-
#value ⇒ Object
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(name, type, value, labels = nil, additional = nil) ⇒ Entry
constructor
A new instance of Entry.
Constructor Details
#initialize(name, type, value, labels = nil, additional = nil) ⇒ Entry
11 12 13 14 15 16 17 18 19 |
# File 'lib/protor/entry.rb', line 11 def initialize(name, type, value, labels = nil, additional = nil) @name = name.to_s @type = type @value = value @labels = labels || {} @additional = additional || [] verify end |
Instance Attribute Details
#additional ⇒ Object (readonly)
Returns the value of attribute additional.
3 4 5 |
# File 'lib/protor/entry.rb', line 3 def additional @additional end |
#labels ⇒ Object (readonly)
Returns the value of attribute labels.
3 4 5 |
# File 'lib/protor/entry.rb', line 3 def labels @labels end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
3 4 5 |
# File 'lib/protor/entry.rb', line 3 def name @name end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
3 4 5 |
# File 'lib/protor/entry.rb', line 3 def type @type end |
#value ⇒ Object
Returns the value of attribute value.
3 4 5 |
# File 'lib/protor/entry.rb', line 3 def value @value end |