Class: ActionCard

Inherits:
Object
  • Object
show all
Defined in:
lib/rbbt/rest/entity/action_card.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(&block) ⇒ ActionCard

Returns a new instance of ActionCard.



4
5
6
7
# File 'lib/rbbt/rest/entity/action_card.rb', line 4

def initialize(&block)
  @action_parameters = block
  @requires = []
end

Instance Attribute Details

#action_parametersObject

Returns the value of attribute action_parameters.



3
4
5
# File 'lib/rbbt/rest/entity/action_card.rb', line 3

def action_parameters
  @action_parameters
end

#description(value = nil, &block) ⇒ Object

Returns the value of attribute description.



3
4
5
# File 'lib/rbbt/rest/entity/action_card.rb', line 3

def description
  @description
end

#requiresObject

Returns the value of attribute requires.



3
4
5
# File 'lib/rbbt/rest/entity/action_card.rb', line 3

def requires
  @requires
end

Instance Method Details

#require(*inputs, &block) ⇒ Object



17
18
19
20
21
22
23
# File 'lib/rbbt/rest/entity/action_card.rb', line 17

def require(*inputs, &block)
  if block_given?
    @requires << [inputs, block]
  else
    @requires.concat inputs
  end
end