Class: APISpec::Example
- Inherits:
-
Object
- Object
- APISpec::Example
- Defined in:
- lib/apispec/example.rb
Instance Method Summary collapse
-
#initialize(format, example) ⇒ Example
constructor
A new instance of Example.
- #to_html(message) ⇒ Object
Constructor Details
#initialize(format, example) ⇒ Example
Returns a new instance of Example.
2 3 4 5 |
# File 'lib/apispec/example.rb', line 2 def initialize(format, example) @format = format @example = example end |
Instance Method Details
#to_html(message) ⇒ Object
7 8 9 |
# File 'lib/apispec/example.rb', line 7 def to_html() CodeRay.scan(@example, @format).div end |