Class: Brut::CLI::Apps::New::AddSegmentOptions
- Inherits:
-
Object
- Object
- Brut::CLI::Apps::New::AddSegmentOptions
- Defined in:
- lib/brut/cli/apps/new/add_segment_options.rb
Instance Attribute Summary collapse
-
#project_root ⇒ Object
readonly
Returns the value of attribute project_root.
-
#segment_name ⇒ Object
readonly
Returns the value of attribute segment_name.
Instance Method Summary collapse
-
#dry_run? ⇒ Boolean
-
#initialize(segment_name:, project_root:, dry_run: nil, versions: nil, **rest) ⇒ AddSegmentOptions
constructor
A new instance of AddSegmentOptions.
Constructor Details
#initialize(segment_name:, project_root:, dry_run: nil, versions: nil, **rest) ⇒ AddSegmentOptions
Returns a new instance of AddSegmentOptions.
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/brut/cli/apps/new/add_segment_options.rb', line 4 def initialize( segment_name:, project_root:, dry_run: nil, versions: nil, **rest ) if segment_name.nil? raise ArgumentError, "segment_name is required" end @segment_name = segment_name @project_root = project_root @dry_run = !!dry_run @versions = versions end |
Instance Attribute Details
#project_root ⇒ Object (readonly)
Returns the value of attribute project_root.
2 3 4 |
# File 'lib/brut/cli/apps/new/add_segment_options.rb', line 2 def project_root @project_root end |
#segment_name ⇒ Object (readonly)
Returns the value of attribute segment_name.
2 3 4 |
# File 'lib/brut/cli/apps/new/add_segment_options.rb', line 2 def segment_name @segment_name end |
Instance Method Details
#dry_run? ⇒ Boolean
21 |
# File 'lib/brut/cli/apps/new/add_segment_options.rb', line 21 def dry_run? = @dry_run |