Class: TelegraphApi::DomToNode
- Inherits:
-
Object
- Object
- TelegraphApi::DomToNode
- Defined in:
- lib/telegraph_api_ruby/dom_to_node.rb
Instance Attribute Summary collapse
-
#data ⇒ Object
readonly
Returns the value of attribute data.
Class Method Summary collapse
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(data) ⇒ DomToNode
constructor
A new instance of DomToNode.
Constructor Details
#initialize(data) ⇒ DomToNode
Returns a new instance of DomToNode.
11 12 13 |
# File 'lib/telegraph_api_ruby/dom_to_node.rb', line 11 def initialize(data) @data = data end |
Instance Attribute Details
#data ⇒ Object (readonly)
Returns the value of attribute data.
5 6 7 |
# File 'lib/telegraph_api_ruby/dom_to_node.rb', line 5 def data @data end |
Class Method Details
.call(*args) ⇒ Object
7 8 9 |
# File 'lib/telegraph_api_ruby/dom_to_node.rb', line 7 def self.call(*args) new(*args).call end |
Instance Method Details
#call ⇒ Object
15 16 17 |
# File 'lib/telegraph_api_ruby/dom_to_node.rb', line 15 def call dom_to_node(parse_html(data))[:children] end |