Class: Tenma::Prepare::Options
- Inherits:
-
Object
- Object
- Tenma::Prepare::Options
- Defined in:
- lib/tenma/prepare/options.rb
Instance Attribute Summary collapse
-
#raw ⇒ Object
readonly
Returns the value of attribute raw.
Instance Method Summary collapse
- #create_kpt_issue? ⇒ Boolean
- #create_release_branch? ⇒ Boolean
- #create_release_issue? ⇒ Boolean
- #create_release_pullreqs? ⇒ Boolean
- #hotfix? ⇒ Boolean
-
#initialize(opts) ⇒ Options
constructor
A new instance of Options.
Constructor Details
#initialize(opts) ⇒ Options
Returns a new instance of Options.
8 9 10 |
# File 'lib/tenma/prepare/options.rb', line 8 def initialize(opts) @raw = Hashie::Mash.new(opts.map { |k, v| [k.gsub(/-/, "_"), v] }.to_h) end |
Instance Attribute Details
#raw ⇒ Object (readonly)
Returns the value of attribute raw.
7 8 9 |
# File 'lib/tenma/prepare/options.rb', line 7 def raw @raw end |
Instance Method Details
#create_kpt_issue? ⇒ Boolean
12 13 14 |
# File 'lib/tenma/prepare/options.rb', line 12 def create_kpt_issue? return !!raw.kpt_issue end |
#create_release_branch? ⇒ Boolean
20 21 22 |
# File 'lib/tenma/prepare/options.rb', line 20 def create_release_branch? return !!raw.release_branch end |
#create_release_issue? ⇒ Boolean
16 17 18 |
# File 'lib/tenma/prepare/options.rb', line 16 def create_release_issue? return !!raw.release_issue end |
#create_release_pullreqs? ⇒ Boolean
24 25 26 |
# File 'lib/tenma/prepare/options.rb', line 24 def create_release_pullreqs? return !!raw.release_pullreqs end |
#hotfix? ⇒ Boolean
28 29 30 |
# File 'lib/tenma/prepare/options.rb', line 28 def hotfix? raw.version.split(".")[2] != "0" end |