Class: XBee::ATCommands::CommandDescriptor

Inherits:
Object
  • Object
show all
Defined in:
lib/ruxbee/at_commands.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(command, command_name, command_description = nil, parameter = nil) {|_self| ... } ⇒ CommandDescriptor

Returns a new instance of CommandDescriptor.

Yields:

  • (_self)

Yield Parameters:



12
13
14
15
16
17
18
# File 'lib/ruxbee/at_commands.rb', line 12

def initialize (command, command_name, command_description = nil, parameter = nil)
  @command = command
  @command_name = command_name
  @command_description = command_description
  @parameter = parameter
  yield self if block_given?
end

Instance Attribute Details

#commandObject (readonly)

Returns the value of attribute command.



10
11
12
# File 'lib/ruxbee/at_commands.rb', line 10

def command
  @command
end

#command_descriptionObject (readonly)

Returns the value of attribute command_description.



10
11
12
# File 'lib/ruxbee/at_commands.rb', line 10

def command_description
  @command_description
end

#command_nameObject (readonly)

Returns the value of attribute command_name.



10
11
12
# File 'lib/ruxbee/at_commands.rb', line 10

def command_name
  @command_name
end

#parameterObject (readonly)

Returns the value of attribute parameter.



10
11
12
# File 'lib/ruxbee/at_commands.rb', line 10

def parameter
  @parameter
end

Instance Method Details

#has_parameter?Boolean

Returns:

  • (Boolean)


20
21
22
# File 'lib/ruxbee/at_commands.rb', line 20

def has_parameter?
  parameter.nil?
end