Skip to content

Instantly share code, notes, and snippets.

@akofink
Created July 26, 2016 18:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save akofink/c1682bfbdf70e848deeed7be6eb31063 to your computer and use it in GitHub Desktop.
Save akofink/c1682bfbdf70e848deeed7be6eb31063 to your computer and use it in GitHub Desktop.
# Old
remaining.each do |s|
options << option(
optionamize("--#{aliased_name}-#{s.name}"),
"#{aliased_name}_#{s.name}".upcase,
s.description || " ",
:attribute_name => HammerCLI.option_accessor_name("#{resource_name}_#{s.name}"),
:referenced_resource => resource.singular_name
)
end
# New
remaining.each do |s|
options << option(
optionamize("--#{s.name}"),
"#{s.name}".upcase,
s.description || " ",
:attribute_name => HammerCLI.option_accessor_name("#{s.name}"),
:referenced_resource => resource.singular_name # I'm not sure if I should remove this line
)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment