Class: Casino::Dimension

Inherits:
Object
  • Object
show all
Defined in:
lib/casino/dimension.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(label, field, queries, approach = Hash.new) ⇒ Dimension

Returns a new instance of Dimension.



4
5
6
7
8
9
# File 'lib/casino/dimension.rb', line 4

def initialize(label, field, queries, approach = Hash.new)
  self.label    = label
  self.field    = field
  self.queries  = queries
  self.approach = { operator: :where }.merge(approach)
end

Instance Attribute Details

#approachObject

Returns the value of attribute approach.



3
4
5
# File 'lib/casino/dimension.rb', line 3

def approach
  @approach
end

#fieldObject

Returns the value of attribute field.



3
4
5
# File 'lib/casino/dimension.rb', line 3

def field
  @field
end

#labelObject

Returns the value of attribute label.



3
4
5
# File 'lib/casino/dimension.rb', line 3

def label
  @label
end

#queriesObject

Returns the value of attribute queries.



3
4
5
# File 'lib/casino/dimension.rb', line 3

def queries
  @queries
end