class Fetching

Constants

VERSION
WHITELIST

Public Class Methods

from(value) click to toggle source
# File lib/fetching.rb, line 25
def self.from(value)
  return value.to_fetching               if value.respond_to? :to_fetching
  return FetchingArray.new(value.to_ary) if value.respond_to? :to_ary
  return FetchingHash.new(value.to_hash) if value.respond_to? :to_hash
  value
end
from_json(json) click to toggle source
# File lib/fetching.rb, line 32
def self.from_json(json)
  from JSON.parse(json)
end
new(table) click to toggle source
# File lib/fetching.rb, line 36
def initialize(table)
  @table = table
end

Public Instance Methods

==(other) click to toggle source
# File lib/fetching.rb, line 40
def ==(other)
  other.hash == hash
end
hash() click to toggle source
# File lib/fetching.rb, line 44
def hash
  self.class.hash ^ @table.hash
end
inspect() click to toggle source
# File lib/fetching.rb, line 56
def inspect
  "#<#{self.class.name}: @table=#{@table}>"
end
to_fetching() click to toggle source
# File lib/fetching.rb, line 48
def to_fetching
  self
end
to_s() click to toggle source
# File lib/fetching.rb, line 52
def to_s
  @table.to_s
end

Private Instance Methods

respond_to_missing?(_method_name, _include_private = false) click to toggle source
# File lib/fetching.rb, line 62
def respond_to_missing?(_method_name, _include_private = false)
  false
end