Class: Soapstone::Context::Linear

Inherits:
Object
  • Object
show all
Defined in:
lib/soapstone/core/context/linear.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(branch_name) ⇒ Linear

Returns a new instance of Linear.



8
9
10
11
# File 'lib/soapstone/core/context/linear.rb', line 8

def initialize(branch_name)
  @config = Soapstone::Config::Load.call
  @branch_name = branch_name
end

Class Method Details

.call(branch_name) ⇒ Object



4
5
6
# File 'lib/soapstone/core/context/linear.rb', line 4

def self.call(branch_name)
  new(branch_name).call
end

Instance Method Details

#callObject



13
14
15
16
17
18
19
# File 'lib/soapstone/core/context/linear.rb', line 13

def call
  LinearInfo.new(
    enabled: linear_enabled?,
    pattern: linear_pattern,
    matches_pattern: matches_linear_pattern?
  )
end