Class: Sinatra::Default::Options
- Inherits:
-
Struct
- Object
- Struct
- Sinatra::Default::Options
- Defined in:
- lib/sinatra/compat.rb
Overview
:nodoc:
Instance Attribute Summary collapse
-
#target ⇒ Object
Returns the value of attribute target.
Instance Method Summary collapse
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(name, *args, &block) ⇒ Object
142 143 144 145 146 147 148 149 150 151 |
# File 'lib/sinatra/compat.rb', line 142 def method_missing(name, *args, &block) if target.respond_to?(name) target.__send__(name, *args, &block) elsif args.empty? && name.to_s !~ /=$/ sinatra_warn 'accessing undefined options will raise a NameError in Sinatra 1.0' nil else super end end |
Instance Attribute Details
#target ⇒ Object
Returns the value of attribute target
141 142 143 |
# File 'lib/sinatra/compat.rb', line 141 def target @target end |