Class: Cure::Dispatch
- Inherits:
-
Object
- Object
- Cure::Dispatch
- Defined in:
- lib/cure/template/dispatch.rb
Overview
This name sucks, it is just an exporter
Instance Attribute Summary collapse
Class Method Summary collapse
Instance Method Summary collapse
- #default ⇒ Object
-
#initialize ⇒ Dispatch
constructor
A new instance of Dispatch.
Constructor Details
#initialize ⇒ Dispatch
Returns a new instance of Dispatch.
10 11 12 |
# File 'lib/cure/template/dispatch.rb', line 10 def initialize @named_ranges = [default] end |
Instance Attribute Details
#named_ranges ⇒ Object
8 9 10 |
# File 'lib/cure/template/dispatch.rb', line 8 def named_ranges @named_ranges end |
Class Method Details
.from_hash(hash) ⇒ Cure::Dispatch
16 17 18 19 20 |
# File 'lib/cure/template/dispatch.rb', line 16 def self.from_hash(hash) this = Cure::Dispatch.new this.named_ranges = hash["sections"] if hash.key?("sections") this end |
Instance Method Details
#default ⇒ Object
22 23 24 25 26 27 28 |
# File 'lib/cure/template/dispatch.rb', line 22 def default { "named_range" => "default", "file_name" => "cure-export", "type" => "csv" } end |