Class: GitPrepareBranch::Variable
- Inherits:
-
Object
- Object
- GitPrepareBranch::Variable
- Defined in:
- lib/git-prepare-branch/variable.rb
Instance Attribute Summary collapse
-
#capture ⇒ Object
readonly
Returns the value of attribute capture.
-
#context ⇒ Object
readonly
Returns the value of attribute context.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(name, context:, value: nil, capture: nil) ⇒ Variable
constructor
A new instance of Variable.
Constructor Details
#initialize(name, context:, value: nil, capture: nil) ⇒ Variable
Returns a new instance of Variable.
7 8 9 10 11 12 |
# File 'lib/git-prepare-branch/variable.rb', line 7 def initialize(name, context:, value: nil, capture: nil) @name = name @context = context @capture = capture @value = calculate_value(value) end |
Instance Attribute Details
#capture ⇒ Object (readonly)
Returns the value of attribute capture.
5 6 7 |
# File 'lib/git-prepare-branch/variable.rb', line 5 def capture @capture end |
#context ⇒ Object (readonly)
Returns the value of attribute context.
5 6 7 |
# File 'lib/git-prepare-branch/variable.rb', line 5 def context @context end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
5 6 7 |
# File 'lib/git-prepare-branch/variable.rb', line 5 def name @name end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
5 6 7 |
# File 'lib/git-prepare-branch/variable.rb', line 5 def value @value end |