module Runbook::Extensions::Statements::DSL
Public Class Methods
_statement_class(name)
click to toggle source
# File lib/runbook/extensions/statements.rb, line 22 def self._statement_class(name) "Runbook::Statements::#{name.to_s.camelize}".constantize rescue NameError end
Public Instance Methods
method_missing(name, *args, &block)
click to toggle source
Calls superclass method
# File lib/runbook/extensions/statements.rb, line 4 def method_missing(name, *args, &block) if (klass = Statements::DSL._statement_class(name)) klass.new(*args, &block).tap do |statement| parent.add(statement) if statement.respond_to?(:into) Runbook.runtime_methods << statement.into end end else super end end
respond_to?(name, include_private = false)
click to toggle source
Calls superclass method
# File lib/runbook/extensions/statements.rb, line 18 def respond_to?(name, include_private = false) !!(Statements::DSL._statement_class(name) || super) end