Class: ApiExplorer::Group
Direct Known Subclasses
Instance Attribute Summary collapse
-
#headers ⇒ Object
Returns the value of attribute headers.
-
#params ⇒ Object
Returns the value of attribute params.
-
#title ⇒ Object
Returns the value of attribute title.
Attributes inherited from Node
Instance Method Summary collapse
- #add_child(child) ⇒ Object
-
#initialize(title, path = "", children = [], shared_headers = [], shared_params = []) ⇒ Group
constructor
A new instance of Group.
Methods inherited from Node
Constructor Details
#initialize(title, path = "", children = [], shared_headers = [], shared_params = []) ⇒ Group
Returns a new instance of Group.
5 6 7 8 9 10 11 |
# File 'lib/api_explorer/group.rb', line 5 def initialize(title, path = "", children = [], shared_headers = [], shared_params = []) super nil, children, path self.title = title self.headers = shared_headers self.params = shared_params end |
Instance Attribute Details
#headers ⇒ Object
Returns the value of attribute headers.
3 4 5 |
# File 'lib/api_explorer/group.rb', line 3 def headers @headers end |
#params ⇒ Object
Returns the value of attribute params.
3 4 5 |
# File 'lib/api_explorer/group.rb', line 3 def params @params end |
#title ⇒ Object
Returns the value of attribute title.
3 4 5 |
# File 'lib/api_explorer/group.rb', line 3 def title @title end |
Instance Method Details
#add_child(child) ⇒ Object
13 14 15 16 |
# File 'lib/api_explorer/group.rb', line 13 def add_child(child) children << child child.parent = self end |