Class: Nezu::Env

Inherits:
String
  • Object
show all
Defined in:
lib/nezu.rb

Overview

used by Nezu.env and Nezu.env.developent? etc.

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(meth, params = nil) ⇒ Object

:nodoc:



22
23
24
25
26
# File 'lib/nezu.rb', line 22

def method_missing(meth, params=nil) #:nodoc:
  env = meth.to_s.sub(/\?$/, '')
  super if env == meth.to_s # doesn't end on "?" ? try parents.
  env == self
end

Instance Method Details

#respond_to?(meth, params = nil) ⇒ Boolean

:nodoc:

Returns:

  • (Boolean)


28
29
30
# File 'lib/nezu.rb', line 28

def respond_to?(meth, params=nil) #:nodoc:
  !!meth.to_s.match(/\?$/) || super
end