Class: Apipony::Documentation

Inherits:
Object
  • Object
show all
Defined in:
lib/apipony/documentation.rb

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.base_urlObject

Returns the value of attribute base_url.



3
4
5
# File 'lib/apipony/documentation.rb', line 3

def base_url
  @base_url
end

.sectionsObject

Returns the value of attribute sections.



3
4
5
# File 'lib/apipony/documentation.rb', line 3

def sections
  @sections
end

.titleObject

Returns the value of attribute title.



3
4
5
# File 'lib/apipony/documentation.rb', line 3

def title
  @title
end

Class Method Details

.config(&block) ⇒ Object



17
18
19
# File 'lib/apipony/documentation.rb', line 17

def config(&block)
  instance_eval(&block)
end

.define(&block) ⇒ Object



5
6
7
8
9
10
11
# File 'lib/apipony/documentation.rb', line 5

def define(&block)
  @sections = []
  @title = 'API Documentation'
  @base_url = ''

  instance_eval(&block)
end

.section(title, &block) ⇒ Object



13
14
15
# File 'lib/apipony/documentation.rb', line 13

def section(title, &block)
  @sections << Apipony::Section.new(title, &block)
end