Class: Apipony::Section
- Inherits:
-
Object
- Object
- Apipony::Section
- Defined in:
- lib/apipony/section.rb
Instance Attribute Summary collapse
-
#endpoints ⇒ Object
Returns the value of attribute endpoints.
-
#title ⇒ Object
Returns the value of attribute title.
Instance Method Summary collapse
- #endpoint(method, url, &block) ⇒ Object
-
#initialize(title, &block) ⇒ Section
constructor
A new instance of Section.
Constructor Details
#initialize(title, &block) ⇒ Section
Returns a new instance of Section.
4 5 6 7 8 9 |
# File 'lib/apipony/section.rb', line 4 def initialize(title, &block) @title = title @endpoints = [] instance_eval(&block) end |
Instance Attribute Details
#endpoints ⇒ Object
Returns the value of attribute endpoints.
2 3 4 |
# File 'lib/apipony/section.rb', line 2 def endpoints @endpoints end |
#title ⇒ Object
Returns the value of attribute title.
2 3 4 |
# File 'lib/apipony/section.rb', line 2 def title @title end |