Class: Hanami::CLI::Commands::Context Private
- Inherits:
-
OpenStruct
- Object
- OpenStruct
- Hanami::CLI::Commands::Context
- Defined in:
- lib/hanami/cli/commands.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
CLI command context
Instance Method Summary collapse
- #binding ⇒ Object private
-
#initialize(data) ⇒ Context
constructor
private
A new instance of Context.
- #with(data) ⇒ Object private
Constructor Details
#initialize(data) ⇒ Context
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of Context.
66 67 68 69 70 71 72 73 74 |
# File 'lib/hanami/cli/commands.rb', line 66 def initialize(data) data = data.each_with_object({}) do |(k, v), result| v = Utils::String.new(v) if v.is_a?(::String) result[k] = v end super(data) freeze end |
Instance Method Details
#binding ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
84 85 86 |
# File 'lib/hanami/cli/commands.rb', line 84 def binding super end |
#with(data) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
78 79 80 |
# File 'lib/hanami/cli/commands.rb', line 78 def with(data) self.class.new(to_h.merge(data)) end |