Class: UrbanAPI::Definition
- Inherits:
-
Struct
- Object
- Struct
- UrbanAPI::Definition
- Defined in:
- lib/urban_api.rb
Instance Attribute Summary collapse
-
#definition ⇒ Object
Returns the value of attribute definition.
-
#example ⇒ Object
Returns the value of attribute example.
Class Method Summary collapse
Instance Attribute Details
#definition ⇒ Object
Returns the value of attribute definition
7 8 9 |
# File 'lib/urban_api.rb', line 7 def definition @definition end |
#example ⇒ Object
Returns the value of attribute example
7 8 9 |
# File 'lib/urban_api.rb', line 7 def example @example end |
Class Method Details
.create(def_node, example_node) ⇒ Object
8 9 10 |
# File 'lib/urban_api.rb', line 8 def self.create(def_node, example_node) new(extract_from(def_node), extract_from(example_node)) end |
.extract_from(node) ⇒ Object
12 13 14 15 16 |
# File 'lib/urban_api.rb', line 12 def self.extract_from(node) if node node.inner_html end end |