Class: Stastic::Command::Rename
- Defined in:
- lib/stastic/commands/rename.rb
Instance Attribute Summary collapse
-
#new_name ⇒ Object
Returns the value of attribute new_name.
Instance Method Summary collapse
- #index ⇒ Object
-
#initialize(args = []) ⇒ Rename
constructor
A new instance of Rename.
Constructor Details
#initialize(args = []) ⇒ Rename
Returns a new instance of Rename.
5 6 7 8 9 10 11 12 |
# File 'lib/stastic/commands/rename.rb', line 5 def initialize(args = []) case args.size when 1 self.new_name = args.first else raise(Stastic::Command::InvalidOptions) end end |
Instance Attribute Details
#new_name ⇒ Object
Returns the value of attribute new_name.
3 4 5 |
# File 'lib/stastic/commands/rename.rb', line 3 def new_name @new_name end |