Class: Clevic::DatasetRoller

Inherits:
Object
  • Object
show all
Defined in:
lib/clevic/dataset_roller.rb

Overview

Tricky, this. Keeps passing on the dataset and lets it build up, but keeps the result. Used in the UI block to make a nice syntax for specifying the dataset.

Instance Method Summary collapse

Constructor Details

#initialize(original_dataset) ⇒ DatasetRoller

Returns a new instance of DatasetRoller.



7
8
9
# File 'lib/clevic/dataset_roller.rb', line 7

def initialize( original_dataset )
  @rolling_dataset = original_dataset
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(meth, *args, &block) ⇒ Object



15
16
17
18
# File 'lib/clevic/dataset_roller.rb', line 15

def method_missing(meth, *args, &block)
  @rolling_dataset = @rolling_dataset.send( meth, *args, &block )
  self
end

Instance Method Details

#datasetObject



11
12
13
# File 'lib/clevic/dataset_roller.rb', line 11

def dataset
  @rolling_dataset
end