Class: Ciphr::Functions::Function

Inherits:
Object
  • Object
show all
Defined in:
lib/ciphr/functions.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options, args) ⇒ Function

Returns a new instance of Function.



8
9
10
11
12
# File 'lib/ciphr/functions.rb', line 8

def initialize(options, args)
  @options = options
  @args = args
  @stream = Ciphr::Stream.new(self)
end

Instance Attribute Details

#argsObject

don’t like that these are both writable, but c’est la vie



13
14
15
# File 'lib/ciphr/functions.rb', line 13

def args
  @args
end

#optionsObject

don’t like that these are both writable, but c’est la vie



13
14
15
# File 'lib/ciphr/functions.rb', line 13

def options
  @options
end

Class Method Details

.alignedObject



31
32
33
# File 'lib/ciphr/functions.rb', line 31

def self.aligned
  nil
end

.inherited(subclass) ⇒ Object



19
20
21
# File 'lib/ciphr/functions.rb', line 19

def self.inherited(subclass)
  Ciphr::FunctionRegistry.global.register(subclass)
end

.invertable?Boolean

Returns:

  • (Boolean)


27
28
29
# File 'lib/ciphr/functions.rb', line 27

def self.invertable?
  false
end

.paramsObject



23
24
25
# File 'lib/ciphr/functions.rb', line 23

def self.params
  []
end

.variantsObject



15
16
17
# File 'lib/ciphr/functions.rb', line 15

def self.variants
  []
end

Instance Method Details

#prepend(*args) ⇒ Object



39
40
41
# File 'lib/ciphr/functions.rb', line 39

def prepend(*args)
  @stream.prepend(*args)
end

#read(*args) ⇒ Object



35
36
37
# File 'lib/ciphr/functions.rb', line 35

def read(*args)
  @stream.read(*args)
end