Class: Frigate::Function
- Inherits:
-
Object
- Object
- Frigate::Function
- Defined in:
- lib/frigate/function.rb
Overview
Class Method Summary collapse
Instance Method Summary collapse
-
#function ⇒ Object
here you should write your function code =).
-
#initialize(attrs) ⇒ Function
constructor
A new instance of Function.
-
#run ⇒ Object
to perform/run the service actionstasks.
Constructor Details
#initialize(attrs) ⇒ Function
Returns a new instance of Function.
28 29 30 |
# File 'lib/frigate/function.rb', line 28 def initialize(attrs) attrs.each { |key, val| instance_variable_set("@#{key}", val) } end |
Class Method Details
.[] ⇒ Object
24 25 26 |
# File 'lib/frigate/function.rb', line 24 def run(attrs) new(attrs).run end |
.property(name) ⇒ Object
15 16 17 |
# File 'lib/frigate/function.rb', line 15 def property(name) class_eval { attr_reader name } end |
.run(attrs) ⇒ Object
20 21 22 |
# File 'lib/frigate/function.rb', line 20 def run(attrs) new(attrs).run end |
Instance Method Details
#function ⇒ Object
here you should write your function code =)
38 39 40 |
# File 'lib/frigate/function.rb', line 38 def function raise NotImplemented end |
#run ⇒ Object
to perform/run the service actionstasks
33 34 35 |
# File 'lib/frigate/function.rb', line 33 def run function end |