Class: Jerakia::Dsl::Lookup
- Inherits:
-
Object
- Object
- Jerakia::Dsl::Lookup
- Defined in:
- lib/jerakia/dsl/lookup.rb
Instance Attribute Summary collapse
-
#lookup ⇒ Object
Returns the value of attribute lookup.
-
#request ⇒ Object
readonly
Returns the value of attribute request.
-
#scope_object ⇒ Object
readonly
Returns the value of attribute scope_object.
Class Method Summary collapse
Instance Method Summary collapse
-
#confine(*args) ⇒ Object
pass through exposed functions from the main lookup object @api: public.
- #continue ⇒ Object
-
#datasource(name, opts = {}) ⇒ Object
define the data source for the lookup @api: public.
- #exclude(*args) ⇒ Object
-
#initialize(name, request, scope, opts = {}) ⇒ Lookup
constructor
A new instance of Lookup.
- #invalidate ⇒ Object
- #output_filter(*args) ⇒ Object
- #plugin ⇒ Object
- #scope ⇒ Object
- #stop ⇒ Object
Constructor Details
Instance Attribute Details
#lookup ⇒ Object
Returns the value of attribute lookup.
6 7 8 |
# File 'lib/jerakia/dsl/lookup.rb', line 6 def lookup @lookup end |
#request ⇒ Object (readonly)
Returns the value of attribute request.
4 5 6 |
# File 'lib/jerakia/dsl/lookup.rb', line 4 def request @request end |
#scope_object ⇒ Object (readonly)
Returns the value of attribute scope_object.
5 6 7 |
# File 'lib/jerakia/dsl/lookup.rb', line 5 def scope_object @scope_object end |
Class Method Details
.evaluate(name, request, scope, opts, &block) ⇒ Object
14 15 16 17 18 |
# File 'lib/jerakia/dsl/lookup.rb', line 14 def self.evaluate(name, request, scope, opts, &block) lookup_block = new(name, request, scope, opts) lookup_block.instance_eval &block return lookup_block.lookup end |
Instance Method Details
#confine(*args) ⇒ Object
pass through exposed functions from the main lookup object @api: public
30 31 32 |
# File 'lib/jerakia/dsl/lookup.rb', line 30 def confine(*args) lookup.confine(*args) end |
#continue ⇒ Object
50 51 52 |
# File 'lib/jerakia/dsl/lookup.rb', line 50 def continue lookup.continue end |
#datasource(name, opts = {}) ⇒ Object
define the data source for the lookup @api: public
22 23 24 25 26 |
# File 'lib/jerakia/dsl/lookup.rb', line 22 def datasource(name, opts = {}) lookup.datasource = { :name => name, :opts => opts } #datasource = Jerakia::Datasource.new(name, lookup, opts) #lookup.datasource = datasource end |
#exclude(*args) ⇒ Object
38 39 40 |
# File 'lib/jerakia/dsl/lookup.rb', line 38 def exclude(*args) lookup.exclude(*args) end |
#invalidate ⇒ Object
42 43 44 |
# File 'lib/jerakia/dsl/lookup.rb', line 42 def invalidate lookup.invalidate end |
#output_filter(*args) ⇒ Object
54 55 56 |
# File 'lib/jerakia/dsl/lookup.rb', line 54 def output_filter(*args) lookup.output_filter(*args) end |
#plugin ⇒ Object
58 59 60 |
# File 'lib/jerakia/dsl/lookup.rb', line 58 def plugin lookup.plugin end |
#scope ⇒ Object
34 35 36 |
# File 'lib/jerakia/dsl/lookup.rb', line 34 def scope @scope_object.value end |
#stop ⇒ Object
46 47 48 |
# File 'lib/jerakia/dsl/lookup.rb', line 46 def stop lookup.stop end |