class NiconicoSearch::Result

Public Class Methods

new(hash = nil) click to toggle source
# File lib/niconico_search/result.rb, line 11
def initialize(hash = nil)
  hash ||= {}
  hash.each do |k, v|
    send("#{k}=", v) if respond_to? "#{k}="
  end
end

Public Instance Methods

inspec() click to toggle source
# File lib/niconico_search/result.rb, line 22
def inspec
  to_hash.inspect
end
to_hash() click to toggle source
# File lib/niconico_search/result.rb, line 18
def to_hash
  Hash[*@@names.map { |v| [v, send(v)] }.flatten]
end