Module: Babelyoda::SpecificationLoader

Included in:
Git, Specification, Tanker
Defined in:
lib/babelyoda/specification_loader.rb

Defined Under Namespace

Modules: ClassMethods

Class Method Summary collapse

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method_name, *args, &block) ⇒ Object



14
15
16
17
# File 'lib/babelyoda/specification_loader.rb', line 14

def method_missing(method_name, *args, &block)
  msg = "You tried to call the method #{method_name}. There is no such method."
  raise msg
end

Class Method Details

.included(klass) ⇒ Object



5
6
7
# File 'lib/babelyoda/specification_loader.rb', line 5

def self.included(klass)
  klass.extend ClassMethods
end

Instance Method Details

#dumpObject



19
20
21
22
23
24
25
# File 'lib/babelyoda/specification_loader.rb', line 19

def dump
  unless ::Rake.application.options.trace
  	ap self, :indent => -2
  else
  	p self
  end
end

#initialize(*args) {|_self| ... } ⇒ Object

Yields:

  • (_self)

Yield Parameters:



9
10
11
12
# File 'lib/babelyoda/specification_loader.rb', line 9

def initialize(*args)
	super
	yield(self) if block_given?
end