Class: Bunto::Compose::MovementArgParser
- Inherits:
-
Object
- Object
- Bunto::Compose::MovementArgParser
- Defined in:
- lib/bunto-compose/movement_arg_parser.rb
Direct Known Subclasses
Bunto::Commands::PublishArgParser, Bunto::Commands::UnpublishArgParser
Instance Attribute Summary collapse
-
#args ⇒ Object
readonly
Returns the value of attribute args.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
-
#initialize(args, options) ⇒ MovementArgParser
constructor
A new instance of MovementArgParser.
- #path ⇒ Object
- #validate! ⇒ Object
Constructor Details
#initialize(args, options) ⇒ MovementArgParser
Returns a new instance of MovementArgParser.
5 6 7 8 |
# File 'lib/bunto-compose/movement_arg_parser.rb', line 5 def initialize(args, ) @args = args = end |
Instance Attribute Details
#args ⇒ Object (readonly)
Returns the value of attribute args.
4 5 6 |
# File 'lib/bunto-compose/movement_arg_parser.rb', line 4 def args @args end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
4 5 6 |
# File 'lib/bunto-compose/movement_arg_parser.rb', line 4 def end |
Instance Method Details
#path ⇒ Object
14 15 16 |
# File 'lib/bunto-compose/movement_arg_parser.rb', line 14 def path args.join ' ' end |
#validate! ⇒ Object
10 11 12 |
# File 'lib/bunto-compose/movement_arg_parser.rb', line 10 def validate! raise ArgumentError.new("You must specify a #{resource_type} path.") if args.empty? end |