Class: Piglet::Udf::Define
- Inherits:
-
Object
- Object
- Piglet::Udf::Define
- Includes:
- Inout::StorageTypes
- Defined in:
- lib/piglet/udf/define.rb
Constant Summary
Constants included from Inout::StorageTypes
Inout::StorageTypes::LOAD_STORE_FUNCTIONS
Instance Method Summary collapse
-
#initialize(ali4s, options = nil) ⇒ Define
constructor
A new instance of Define.
- #to_s ⇒ Object
Methods included from Inout::StorageTypes
Constructor Details
#initialize(ali4s, options = nil) ⇒ Define
Returns a new instance of Define.
8 9 10 11 12 13 14 15 16 17 |
# File 'lib/piglet/udf/define.rb', line 8 def initialize(ali4s, =nil) ||= {} @alias = ali4s @command = [:command] @function = [:function] @input = [:input] @output = [:output] @ship = [:ship] @cache = [:cache] end |
Instance Method Details
#to_s ⇒ Object
19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/piglet/udf/define.rb', line 19 def to_s if @command str = "DEFINE #{@alias} `#{@command}`" str << io_to_s(:input, @input) if @input str << io_to_s(:output, @output) if @output str << paths_to_s(:ship, @ship) if @ship str << paths_to_s(:cache, @cache) if @cache str else "DEFINE #{@alias} #{@function}" end end |