Class: GitPrepareBranch::Variable

Inherits:
Object
  • Object
show all
Defined in:
lib/git-prepare-branch/variable.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#captureObject (readonly)

Returns the value of attribute capture.



5
6
7
# File 'lib/git-prepare-branch/variable.rb', line 5

def capture
  @capture
end

#contextObject (readonly)

Returns the value of attribute context.



5
6
7
# File 'lib/git-prepare-branch/variable.rb', line 5

def context
  @context
end

#nameObject (readonly)

Returns the value of attribute name.



5
6
7
# File 'lib/git-prepare-branch/variable.rb', line 5

def name
  @name
end

#valueObject (readonly)

Returns the value of attribute value.



5
6
7
# File 'lib/git-prepare-branch/variable.rb', line 5

def value
  @value
end