Module: SimpleRouter::DSL::ClassMethods
- Defined in:
- lib/simple_router/dsl.rb
Instance Attribute Summary collapse
-
#routes ⇒ Object
readonly
Returns the value of attribute routes.
Instance Method Summary collapse
- #delete(path, opts = {}, &block) ⇒ Object
- #get(path, opts = {}, &block) ⇒ Object
- #post(path, opts = {}, &block) ⇒ Object
- #put(path, opts = {}, &block) ⇒ Object
Instance Attribute Details
#routes ⇒ Object (readonly)
Returns the value of attribute routes.
49 50 51 |
# File 'lib/simple_router/dsl.rb', line 49 def routes @routes end |
Instance Method Details
#delete(path, opts = {}, &block) ⇒ Object
54 |
# File 'lib/simple_router/dsl.rb', line 54 def delete(path, opts={}, &block) routes.add(:delete, path, opts, &block) end |
#get(path, opts = {}, &block) ⇒ Object
51 |
# File 'lib/simple_router/dsl.rb', line 51 def get( path, opts={}, &block) routes.add(:get, path, opts, &block) end |
#post(path, opts = {}, &block) ⇒ Object
52 |
# File 'lib/simple_router/dsl.rb', line 52 def post( path, opts={}, &block) routes.add(:post, path, opts, &block) end |
#put(path, opts = {}, &block) ⇒ Object
53 |
# File 'lib/simple_router/dsl.rb', line 53 def put( path, opts={}, &block) routes.add(:put, path, opts, &block) end |