Class: Warped::Table::Action

Inherits:
Object
  • Object
show all
Defined in:
lib/warped/table/action.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, path, **options) ⇒ Action

Returns a new instance of Action.

Parameters:

  • name (String | Symbol | Proc)

    The name of the action

  • path (String | Symbol | Proc)

    The path of the action



14
15
16
17
18
# File 'lib/warped/table/action.rb', line 14

def initialize(name, path, **options)
  @name = name
  @path = path
  @options = options
end

Instance Attribute Details

#optionsObject (readonly)

Returns the value of attribute options.



8
9
10
# File 'lib/warped/table/action.rb', line 8

def options
  @options
end

Instance Method Details

#nameObject



26
27
28
29
30
# File 'lib/warped/table/action.rb', line 26

def name(...)
  return @name.call(...) if @name.is_a?(Proc)

  @name
end

#pathObject



20
21
22
23
24
# File 'lib/warped/table/action.rb', line 20

def path(...)
  return @path.call(...) if @path.is_a?(Proc)

  @path
end