Class: Talktome::Client
- Inherits:
-
Object
- Object
- Talktome::Client
- Defined in:
- lib/talktome/client.rb,
lib/talktome/client/local.rb
Direct Known Subclasses
Defined Under Namespace
Classes: Local
Instance Attribute Summary collapse
-
#folder ⇒ Object
readonly
Returns the value of attribute folder.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
-
#initialize(folder, options = {}) {|_self| ... } ⇒ Client
constructor
A new instance of Client.
- #strategy(name, stragegy) ⇒ Object
Constructor Details
#initialize(folder, options = {}) {|_self| ... } ⇒ Client
Returns a new instance of Client.
4 5 6 7 8 9 10 |
# File 'lib/talktome/client.rb', line 4 def initialize(folder, = {}) raise ArgumentError, "Missing root folder" unless folder raise ArgumentError, "Invalid root folder" unless Path(folder).directory? @folder = folder @options = Talktome.(folder).merge() yield self if block_given? end |
Instance Attribute Details
#folder ⇒ Object (readonly)
Returns the value of attribute folder.
11 12 13 |
# File 'lib/talktome/client.rb', line 11 def folder @folder end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
11 12 13 |
# File 'lib/talktome/client.rb', line 11 def @options end |
Instance Method Details
#strategy(name, stragegy) ⇒ Object
13 14 15 |
# File 'lib/talktome/client.rb', line 13 def strategy(name, stragegy) strategies[name] = stragegy end |