Class: ApiDoc::Resource::Blueprint
- Inherits:
-
Object
- Object
- ApiDoc::Resource::Blueprint
- Defined in:
- lib/apidoc.rb
Instance Method Summary collapse
- #accept(format) ⇒ Object
- #after(&block) ⇒ Object
- #before(&block) ⇒ Object
- #content_type(format) ⇒ Object
- #desc(val) ⇒ Object
-
#initialize(resource, &block) ⇒ Blueprint
constructor
A new instance of Blueprint.
- #params(&block) ⇒ Object
Constructor Details
#initialize(resource, &block) ⇒ Blueprint
Returns a new instance of Blueprint.
140 141 142 143 |
# File 'lib/apidoc.rb', line 140 def initialize(resource, &block) @resource = resource instance_eval &block end |
Instance Method Details
#accept(format) ⇒ Object
149 150 151 |
# File 'lib/apidoc.rb', line 149 def accept(format) @resource.accept = format end |
#after(&block) ⇒ Object
165 166 167 |
# File 'lib/apidoc.rb', line 165 def after(&block) @resource.after_blocks << block end |
#before(&block) ⇒ Object
161 162 163 |
# File 'lib/apidoc.rb', line 161 def before(&block) @resource.before_blocks << block end |
#content_type(format) ⇒ Object
153 154 155 |
# File 'lib/apidoc.rb', line 153 def content_type(format) @resource.content_type = format end |
#desc(val) ⇒ Object
145 146 147 |
# File 'lib/apidoc.rb', line 145 def desc(val) @resource.desc = val end |
#params(&block) ⇒ Object
157 158 159 |
# File 'lib/apidoc.rb', line 157 def params(&block) @resource.params = block end |