Module: Cassie::Statements::Statement::TypeHinting::ClassMethods

Included in:
Cassie::Statements::Statement
Defined in:
lib/cassie/statements/statement/type_hinting.rb

Instance Method Summary collapse

Instance Method Details

#type_hints(hints = :get) ⇒ Array, Hash

DSL to set the type hints execution option Defaults to nil if none are set

Parameters:

  • hints (Array, Hash) (defaults to: :get)

    Hints to use for value serialization. Array for positional arguments, Hash for named arguments.

Returns:

  • (Array, Hash)

    hints to use for value serialization. Array for positional arguments, Hash for named arguments.



24
25
26
27
28
29
30
31
# File 'lib/cassie/statements/statement/type_hinting.rb', line 24

def type_hints(hints=:get)
  if hints == :get
    return @type_hints if defined?(@type_hints)
    nil
  else
    self.type_hints = hints
  end
end

#type_hints=(val) ⇒ Object



16
17
18
# File 'lib/cassie/statements/statement/type_hinting.rb', line 16

def type_hints=(val)
  @type_hints = val
end