Class: GrapeSlate::ExampleGenerator::Shell
- Inherits:
-
Object
- Object
- GrapeSlate::ExampleGenerator::Shell
- Defined in:
- lib/grape-slate/example_generator/shell.rb
Instance Attribute Summary collapse
-
#resource ⇒ Object
readonly
Returns the value of attribute resource.
-
#route ⇒ Object
readonly
Returns the value of attribute route.
Instance Method Summary collapse
- #example_binding ⇒ Object
-
#initialize(route, resource) ⇒ Shell
constructor
A new instance of Shell.
- #lines ⇒ Object
Constructor Details
#initialize(route, resource) ⇒ Shell
Returns a new instance of Shell.
7 8 9 10 |
# File 'lib/grape-slate/example_generator/shell.rb', line 7 def initialize(route, resource) @route = route @resource = resource end |
Instance Attribute Details
#resource ⇒ Object (readonly)
Returns the value of attribute resource.
2 3 4 |
# File 'lib/grape-slate/example_generator/shell.rb', line 2 def resource @resource end |
#route ⇒ Object (readonly)
Returns the value of attribute route.
2 3 4 |
# File 'lib/grape-slate/example_generator/shell.rb', line 2 def route @route end |
Instance Method Details
#example_binding ⇒ Object
16 17 18 |
# File 'lib/grape-slate/example_generator/shell.rb', line 16 def example_binding binding end |
#lines ⇒ Object
12 13 14 |
# File 'lib/grape-slate/example_generator/shell.rb', line 12 def lines @lines ||= [command, request, data, headers, verbose].flatten.compact end |