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
129 130 131 132 133 134 135 136 137 138 |
# File 'lib/sinatra/compat.rb', line 129 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
128 129 130 |
# File 'lib/sinatra/compat.rb', line 128 def target @target end |