Class: Droutes::Struct
- Inherits:
-
Object
- Object
- Droutes::Struct
- Defined in:
- lib/droutes/parser.rb
Instance Attribute Summary collapse
-
#action ⇒ Object
readonly
Returns the value of attribute action.
-
#docs ⇒ Object
readonly
Returns the value of attribute docs.
-
#klass ⇒ Object
readonly
Returns the value of attribute klass.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
-
#verb ⇒ Object
readonly
Returns the value of attribute verb.
Instance Method Summary collapse
- #controller ⇒ Object
-
#initialize(klass, action, route, docs) ⇒ Struct
constructor
A new instance of Struct.
Constructor Details
#initialize(klass, action, route, docs) ⇒ Struct
Returns a new instance of Struct.
24 25 26 27 28 29 30 |
# File 'lib/droutes/parser.rb', line 24 def initialize(klass, action, route, docs) @klass = klass @action = action @verb = route.verb @path = route.path.sub(/\(.:format\)/, "") @docs = docs end |
Instance Attribute Details
#action ⇒ Object (readonly)
Returns the value of attribute action.
22 23 24 |
# File 'lib/droutes/parser.rb', line 22 def action @action end |
#docs ⇒ Object (readonly)
Returns the value of attribute docs.
22 23 24 |
# File 'lib/droutes/parser.rb', line 22 def docs @docs end |
#klass ⇒ Object (readonly)
Returns the value of attribute klass.
22 23 24 |
# File 'lib/droutes/parser.rb', line 22 def klass @klass end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
22 23 24 |
# File 'lib/droutes/parser.rb', line 22 def path @path end |
#verb ⇒ Object (readonly)
Returns the value of attribute verb.
22 23 24 |
# File 'lib/droutes/parser.rb', line 22 def verb @verb end |
Instance Method Details
#controller ⇒ Object
32 33 34 |
# File 'lib/droutes/parser.rb', line 32 def controller @klass.controller end |