Class: Megalopolis::Index

Inherits:
MHash
  • Object
show all
Defined in:
lib/megalopolis/scheme.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from MHash

#method_missing, #params

Constructor Details

#initialize(base_url, index) ⇒ Index

Returns a new instance of Index.



68
69
70
71
72
# File 'lib/megalopolis/scheme.rb', line 68

def initialize(base_url, index)
  @base_url = base_url
  @index = index
  super(@index)
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Megalopolis::MHash

Instance Attribute Details

#base_urlObject (readonly)

Returns the value of attribute base_url.



65
66
67
# File 'lib/megalopolis/scheme.rb', line 65

def base_url
  @base_url
end

#indexObject (readonly)

Returns the value of attribute index.



66
67
68
# File 'lib/megalopolis/scheme.rb', line 66

def index
  @index
end

Instance Method Details

#fetchObject Also known as: get



74
75
76
# File 'lib/megalopolis/scheme.rb', line 74

def fetch
  Novel.new(@base_url, self.log, self.id)
end