Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Command.name overrides Class.name #6

Closed
nicobrevin opened this issue Jul 28, 2012 · 1 comment
Closed

Command.name overrides Class.name #6

nicobrevin opened this issue Jul 28, 2012 · 1 comment
Labels

Comments

@nicobrevin
Copy link
Collaborator

When defining commands, you do the following:

class MyCommand < Climate::Command
  name 'mine'
end

MyCommand.name # 'mine'

Which is done via Command.name(name=nil). This looks lovely and everything, but means you can't get back to Class.name without jiggery-pokery

@nicobrevin
Copy link
Collaborator Author

I've changed it so that you can set the name using a class function, so...

class MyCommand < Command('my_command')
end

or with

class MyCommand < Command
  set_name 'my_command'
end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant