Class: DSLCompose::Parser::BlockArguments

Inherits:
Object
  • Object
show all
Defined in:
lib/dsl_compose/parser/block_arguments.rb

Class Method Summary collapse

Class Method Details

.accepts_argument?(arg_name, &block) ⇒ Boolean

Returns:

  • (Boolean)


4
5
6
# File 'lib/dsl_compose/parser/block_arguments.rb', line 4

def self.accepts_argument? arg_name, &block
  block.parameters.any? { |type, name| name == arg_name }
end