Class: Niconico::Mylist

Inherits:
Fabric
  • Object
show all
Includes:
Helper
Defined in:
lib/nv/niconico/mylist.rb

Instance Attribute Summary

Attributes inherited from Fabric

#agent

Instance Method Summary collapse

Methods included from Helper

#escape_string, #mylist?

Methods inherited from Fabric

#sign_in, #signed_in?

Constructor Details

#initialize(ptr, agent = nil) ⇒ Mylist

Returns a new instance of Mylist.



5
6
7
8
9
10
11
# File 'lib/nv/niconico/mylist.rb', line 5

def initialize(ptr, agent=nil)
  super(agent)

  @id = normalize(ptr)
  @mylist = nil
  fetch
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method, *args) ⇒ Object

Raises:

  • (NoMethodError)


13
14
15
16
# File 'lib/nv/niconico/mylist.rb', line 13

def method_missing(method, *args)
  raise(NoMethodError, method) unless @mylist.respond_to? method
  @mylist[method]
end