Class: LHS::Record::Chainable::Link

Inherits:
Object
  • Object
show all
Defined in:
lib/lhs/concerns/record/chainable.rb

Overview

Link: A part of a chain

Direct Known Subclasses

Option, Pagination, Parameter

Instance Method Summary collapse

Constructor Details

#initialize(hash = nil) ⇒ Link

Returns a new instance of Link.



37
38
39
# File 'lib/lhs/concerns/record/chainable.rb', line 37

def initialize(hash = nil)
  @hash = hash
end

Instance Method Details

#[](parameter) ⇒ Object



41
42
43
# File 'lib/lhs/concerns/record/chainable.rb', line 41

def [](parameter)
  @hash[parameter]
end

#to_hashObject



45
46
47
# File 'lib/lhs/concerns/record/chainable.rb', line 45

def to_hash
  @hash
end