Class: Legalizer::Base
- Inherits:
-
Object
- Object
- Legalizer::Base
- Defined in:
- lib/legalizer/base.rb
Instance Method Summary collapse
- #config ⇒ Object
- #connection ⇒ Object
- #contracts ⇒ Object
- #find ⇒ Object
-
#initialize(options = {}) ⇒ Base
constructor
A new instance of Base.
- #templates ⇒ Object
- #token ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ Base
Returns a new instance of Base.
3 4 5 6 7 8 9 10 11 |
# File 'lib/legalizer/base.rb', line 3 def initialize(={}) if [:config].is_a? Legalizer::Config @config = [:config] @connection = [:config].connection @token = [:config].token else @config = Legalizer::Config.new() end end |
Instance Method Details
#config ⇒ Object
21 22 23 |
# File 'lib/legalizer/base.rb', line 21 def config @config end |
#connection ⇒ Object
13 14 15 |
# File 'lib/legalizer/base.rb', line 13 def connection @config.connection end |
#contracts ⇒ Object
29 30 31 |
# File 'lib/legalizer/base.rb', line 29 def contracts Legalizer::Contract.new({:config => @config}) end |
#find ⇒ Object
33 34 35 |
# File 'lib/legalizer/base.rb', line 33 def find Legalizer::Find.new({:config => @config}) end |
#templates ⇒ Object
25 26 27 |
# File 'lib/legalizer/base.rb', line 25 def templates Legalizer::Template.new({:config => @config}) end |
#token ⇒ Object
17 18 19 |
# File 'lib/legalizer/base.rb', line 17 def token @config.token end |