Class: Rx::Observable::HashConfiguration

Inherits:
Object
  • Object
show all
Defined in:
lib/rx/operators/aggregates.rb

Constant Summary collapse

DEFAULT_SELECTOR =
lambda {|x| x}

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeHashConfiguration

Returns a new instance of HashConfiguration.



538
539
540
541
# File 'lib/rx/operators/aggregates.rb', line 538

def initialize
  @key_selector_block = DEFAULT_SELECTOR
  @value_selector_block = DEFAULT_SELECTOR
end

Instance Attribute Details

#key_selector_blockObject (readonly)

Returns the value of attribute key_selector_block.



536
537
538
# File 'lib/rx/operators/aggregates.rb', line 536

def key_selector_block
  @key_selector_block
end

#value_selector_blockObject (readonly)

Returns the value of attribute value_selector_block.



536
537
538
# File 'lib/rx/operators/aggregates.rb', line 536

def value_selector_block
  @value_selector_block
end

Instance Method Details

#key_selector(&key_selector_block) ⇒ Object



543
544
545
# File 'lib/rx/operators/aggregates.rb', line 543

def key_selector(&key_selector_block)
  @key_selector_block = key_selector_block
end

#value_selector(&value_selector_block) ⇒ Object



547
548
549
# File 'lib/rx/operators/aggregates.rb', line 547

def value_selector(&value_selector_block)
  @on_error_block = value_selector_block
end