Class: Lapidarist::GroupConstraint
- Inherits:
-
Object
- Object
- Lapidarist::GroupConstraint
- Defined in:
- lib/lapidarist/group_constraint.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(input) ⇒ GroupConstraint
constructor
A new instance of GroupConstraint.
- #level ⇒ Object
Constructor Details
#initialize(input) ⇒ GroupConstraint
5 6 7 8 9 |
# File 'lib/lapidarist/group_constraint.rb', line 5 def initialize(input) parts = input.split(':') @name = parts[0] @level = Lapidarist::Level.from(parts[1]) end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
3 4 5 |
# File 'lib/lapidarist/group_constraint.rb', line 3 def name @name end |
Instance Method Details
#level ⇒ Object
11 12 13 |
# File 'lib/lapidarist/group_constraint.rb', line 11 def level @level || Lapidarist.config.version end |