Class: HtmlSlicer::Configuration

Inherits:
Object
  • Object
show all
Includes:
ActiveSupport::Configurable
Defined in:
lib/html_slicer/config.rb

Overview

need a Class for 3.0

Instance Method Summary collapse

Instance Method Details

#duplicateObject



69
70
71
72
73
# File 'lib/html_slicer/config.rb', line 69

def duplicate
  Configuration.new.tap do |c|
     c.config.replace(config.deep_copy)
  end
end

#param_nameObject



65
66
67
# File 'lib/html_slicer/config.rb', line 65

def param_name
  config.param_name.respond_to?(:call) ? config.param_name.call : config.param_name
end

#sliceObject

Ugly coding. Override Hash::slice method



61
62
63
# File 'lib/html_slicer/config.rb', line 61

def slice # Ugly coding. Override Hash::slice method
  config[:slice]
end