Class: APISpec::Example

Inherits:
Object
  • Object
show all
Defined in:
lib/apispec/example.rb

Instance Method Summary collapse

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(message)
  CodeRay.scan(@example, @format).div
end