Class: Megalith
- Inherits:
-
Object
- Object
- Megalith
- Defined in:
- lib/megalith.rb,
lib/megalith/scheme.rb,
lib/megalith/version.rb,
lib/megalith/essentials.rb
Defined Under Namespace
Modules: Essentials Classes: Author, Comment, Index, Novel, Subject
Constant Summary collapse
- USER_AGENT =
"Megalith Ruby Wrapper #{Megalith::VERSION}"
- VERSION =
"0.2.1"
Instance Attribute Summary collapse
-
#base_url ⇒ Object
Returns the value of attribute base_url.
Instance Method Summary collapse
- #get(args = {}) ⇒ Object
-
#initialize(base_url) ⇒ Megalith
constructor
A new instance of Megalith.
Constructor Details
#initialize(base_url) ⇒ Megalith
Returns a new instance of Megalith.
17 18 19 |
# File 'lib/megalith.rb', line 17 def initialize(base_url) @base_url = base_url end |
Instance Attribute Details
#base_url ⇒ Object
Returns the value of attribute base_url.
14 15 16 |
# File 'lib/megalith.rb', line 14 def base_url @base_url end |
Instance Method Details
#get(args = {}) ⇒ Object
21 22 23 24 25 26 27 28 |
# File 'lib/megalith.rb', line 21 def get(args={}) args[:log] ||= 0 if args.has_key?(:key) Novel.new(@base_url, args[:log], args[:key]) else Subject.new(@base_url, args[:log]) end end |