Class: BetterHelpers::NamespaceToHash
- Inherits:
-
Object
- Object
- BetterHelpers::NamespaceToHash
- Defined in:
- lib/better_helpers/namespace_to_hash.rb
Instance Method Summary collapse
-
#initialize(helper_class, names) ⇒ NamespaceToHash
constructor
A new instance of NamespaceToHash.
- #perform ⇒ Object
Constructor Details
#initialize(helper_class, names) ⇒ NamespaceToHash
Returns a new instance of NamespaceToHash.
3 4 5 6 |
# File 'lib/better_helpers/namespace_to_hash.rb', line 3 def initialize helper_class, names @helper_class = helper_class @names = names.clone end |
Instance Method Details
#perform ⇒ Object
8 9 10 |
# File 'lib/better_helpers/namespace_to_hash.rb', line 8 def perform generate_hash @names.shift, @names, {} end |