Class: Roby::Interface::V2::Protocol::ActionModel

Inherits:
Struct
  • Object
show all
Defined in:
lib/roby/interface/v2/protocol.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#advancedObject

Returns the value of attribute advanced

Returns:

  • (Object)

    the current value of advanced



13
14
15
# File 'lib/roby/interface/v2/protocol.rb', line 13

def advanced
  @advanced
end

#argumentsObject

Returns the value of attribute arguments

Returns:

  • (Object)

    the current value of arguments



13
14
15
# File 'lib/roby/interface/v2/protocol.rb', line 13

def arguments
  @arguments
end

#docObject

Returns the value of attribute doc

Returns:

  • (Object)

    the current value of doc



13
14
15
# File 'lib/roby/interface/v2/protocol.rb', line 13

def doc
  @doc
end

#nameObject

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



13
14
15
# File 'lib/roby/interface/v2/protocol.rb', line 13

def name
  @name
end

#planner_nameObject

Returns the value of attribute planner_name

Returns:

  • (Object)

    the current value of planner_name



13
14
15
# File 'lib/roby/interface/v2/protocol.rb', line 13

def planner_name
  @planner_name
end

Instance Method Details

#advanced?Boolean

Returns:

  • (Boolean)


16
17
18
# File 'lib/roby/interface/v2/protocol.rb', line 16

def advanced?
    advanced
end

#pp_arguments(pp) ⇒ Object



20
21
22
23
24
25
26
27
# File 'lib/roby/interface/v2/protocol.rb', line 20

def pp_arguments(pp)
    pp.nest(2) do
        arguments.each do |arg|
            pp.breakable
            arg.pretty_print(pp)
        end
    end
end

#pretty_print(pp) ⇒ Object



29
30
31
32
33
34
35
36
37
# File 'lib/roby/interface/v2/protocol.rb', line 29

def pretty_print(pp)
    args = arguments.map(&:name).join(", ")
    pp.text "#{planner_name}.#{name}(#{args})"
    pp.breakable
    pp.text doc
    pp.breakable
    pp.text "Arguments"
    pp_arguments(pp)
end