Class: HtmlSlicer::Processor

Inherits:
Object
  • Object
show all
Defined in:
lib/html_slicer/processor.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(stuff = nil) ⇒ Processor

Returns a new instance of Processor.



6
7
8
9
10
11
12
13
14
15
16
# File 'lib/html_slicer/processor.rb', line 6

def initialize(stuff = nil)
  @content = case stuff
  when String then stuff
  else
    if stuff.respond_to?(:to_s)
      stuff.to_s
    else
      raise(TypeError, "String or responsible :to_s object expected, #{stuff.class} passed.")
    end
  end
end

Instance Attribute Details

#contentObject

Returns the value of attribute content.



4
5
6
# File 'lib/html_slicer/processor.rb', line 4

def content
  @content
end

Instance Method Details

#exportObject



21
22
23
# File 'lib/html_slicer/processor.rb', line 21

def export
  make
end

#makeObject



18
19
# File 'lib/html_slicer/processor.rb', line 18

def make
end