Class: ServiceStack::Function
- Inherits:
-
Object
- Object
- ServiceStack::Function
- Defined in:
- lib/service_stack/function.rb
Constant Summary collapse
- Error =
Class.new(StandardError) do attr_reader :message, :data def initialize(, data = nil) @message = @data = data end end
Instance Attribute Summary collapse
-
#input ⇒ Object
readonly
Returns the value of attribute input.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Class Method Summary collapse
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(input, options = {}) ⇒ Function
constructor
A new instance of Function.
Constructor Details
#initialize(input, options = {}) ⇒ Function
Returns a new instance of Function.
18 19 20 21 |
# File 'lib/service_stack/function.rb', line 18 def initialize(input, = {}) @input = input @options = (.is_a?(Hash) ? .dup : {}).freeze end |
Instance Attribute Details
#input ⇒ Object (readonly)
Returns the value of attribute input.
3 4 5 |
# File 'lib/service_stack/function.rb', line 3 def input @input end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
3 4 5 |
# File 'lib/service_stack/function.rb', line 3 def @options end |
Class Method Details
.perform(input, options = {}) ⇒ Object
14 15 16 |
# File 'lib/service_stack/function.rb', line 14 def self.perform(input, = {}) new(input, ).call end |
Instance Method Details
#call ⇒ Object
23 24 25 |
# File 'lib/service_stack/function.rb', line 23 def call raise "#call not implemented in #{self.class}" end |