Class: Dependabot::Config::UpdateConfig::CommitMessageOptions

Inherits:
Object
  • Object
show all
Defined in:
lib/dependabot/config/update_config.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(prefix:, prefix_development:, include:) ⇒ CommitMessageOptions

Returns a new instance of CommitMessageOptions.



48
49
50
51
52
# File 'lib/dependabot/config/update_config.rb', line 48

def initialize(prefix:, prefix_development:, include:)
  @prefix = prefix
  @prefix_development = prefix_development
  @include = include
end

Instance Attribute Details

#includeObject (readonly)

Returns the value of attribute include.



46
47
48
# File 'lib/dependabot/config/update_config.rb', line 46

def include
  @include
end

#prefixObject (readonly)

Returns the value of attribute prefix.



46
47
48
# File 'lib/dependabot/config/update_config.rb', line 46

def prefix
  @prefix
end

#prefix_developmentObject (readonly)

Returns the value of attribute prefix_development.



46
47
48
# File 'lib/dependabot/config/update_config.rb', line 46

def prefix_development
  @prefix_development
end

Instance Method Details

#include_scope?Boolean

Returns:

  • (Boolean)


54
55
56
# File 'lib/dependabot/config/update_config.rb', line 54

def include_scope?
  @include == "scope"
end

#to_hObject



58
59
60
61
62
63
64
# File 'lib/dependabot/config/update_config.rb', line 58

def to_h
  {
    prefix: @prefix,
    prefix_development: @prefix_development,
    include_scope: include_scope?
  }
end