Class: Precious::API::V2::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/precious/base.rb

Direct Known Subclasses

Books, Chapters, Characters, Movies, Quotes

Constant Summary collapse

API_ENDPOINT =
"https://the-one-api.dev/v2/"

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_key = nil) ⇒ Base

Returns a new instance of Base.



11
12
13
# File 'lib/precious/base.rb', line 11

def initialize(api_key = nil)
  @api_key = api_key
end

Instance Attribute Details

#api_keyObject (readonly)

Returns the value of attribute api_key.



9
10
11
# File 'lib/precious/base.rb', line 9

def api_key
  @api_key
end