class CrawlStation::ParseStruct

Attributes

parse[RW]

Public Class Methods

new(opts = {}) click to toggle source
# File lib/crawl_station/fundation/parse_struct.rb, line 13
def initialize(opts = {})
  @parse = opts
  @parse.deep_symbolize_keys!
end

Public Instance Methods

[](item) click to toggle source
# File lib/crawl_station/fundation/parse_struct.rb, line 18
def [](item)
  get_value(item)
end
[]=(item, value) click to toggle source
# File lib/crawl_station/fundation/parse_struct.rb, line 22
def []=(item, value)
  set_value(item, value)
end

Private Instance Methods

get_value(item) click to toggle source
# File lib/crawl_station/fundation/parse_struct.rb, line 28
def get_value(item)
  @parse[item.to_sym]
end
set_value(item, value) click to toggle source
# File lib/crawl_station/fundation/parse_struct.rb, line 32
def set_value(item, value)
  @parse[item.to_sym] = value
end