Class: Telegraph::Parser::Parser

Inherits:
Object
  • Object
show all
Defined in:
lib/telegraph/parser/parser.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(binding, image_prefix) ⇒ Parser

Returns a new instance of Parser.



8
9
10
11
12
# File 'lib/telegraph/parser/parser.rb', line 8

def initialize(binding, image_prefix)
  self.bindings = binding
  self.image_prefix = image_prefix
  parse_html
end

Instance Attribute Details

#articleObject

Returns the value of attribute article.



6
7
8
# File 'lib/telegraph/parser/parser.rb', line 6

def article
  @article
end

#bindingsObject

Returns the value of attribute bindings.



6
7
8
# File 'lib/telegraph/parser/parser.rb', line 6

def bindings
  @bindings
end

#image_prefixObject

Returns the value of attribute image_prefix.



6
7
8
# File 'lib/telegraph/parser/parser.rb', line 6

def image_prefix
  @image_prefix
end

#page=(value) ⇒ Object

Sets the attribute page

Parameters:

  • value

    the value to set the attribute page to.



6
7
8
# File 'lib/telegraph/parser/parser.rb', line 6

def page=(value)
  @page = value
end