Class: Rbnotes::Commands::Commands::CmdNames

Inherits:
Object
  • Object
show all
Defined in:
lib/rbnotes/commands/commands.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(cmd) ⇒ CmdNames

Returns a new instance of CmdNames.



96
97
98
99
100
# File 'lib/rbnotes/commands/commands.rb', line 96

def initialize(cmd)
  @symbol = cmd
  @name = cmd.to_s.downcase
  @size = name.size
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



95
96
97
# File 'lib/rbnotes/commands/commands.rb', line 95

def name
  @name
end

#sizeObject (readonly)

Returns the value of attribute size.



95
96
97
# File 'lib/rbnotes/commands/commands.rb', line 95

def size
  @size
end

#symbolObject (readonly)

Returns the value of attribute symbol.



95
96
97
# File 'lib/rbnotes/commands/commands.rb', line 95

def symbol
  @symbol
end