Module: Betterdocs::Dsl::Common

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(name, *a, &b) ⇒ Object (private)



17
18
19
20
21
22
23
# File 'lib/betterdocs/dsl/common.rb', line 17

def method_missing(name, *a, &b)
  if @__context__
    @__context__.__send__(name, *a, &b)
  else
    super
  end
end

Instance Method Details

#set_context(context) ⇒ Object



10
11
12
13
# File 'lib/betterdocs/dsl/common.rb', line 10

def set_context(context)
  @__context__ = context
  self
end