Module: Hashmake::HashMakeable::ClassMethods
- Defined in:
- lib/hashmake/hash_makeable.rb
Overview
Contains class methods to be added to a class that includes the HashMakeable module.
Instance Method Summary collapse
-
#arg_spec(args) ⇒ Object
Helper method to make a generic new ArgSpec object.
-
#arg_spec_array(args) ⇒ Object
Helper method to make a ArgSpec object where the container is an Array.
-
#arg_spec_hash(args) ⇒ Object
Helper method to make a ArgSpec object where the container is an Hash.
Instance Method Details
#arg_spec(args) ⇒ Object
Helper method to make a generic new ArgSpec object
86 87 88 |
# File 'lib/hashmake/hash_makeable.rb', line 86 def arg_spec args ArgSpec.new args end |
#arg_spec_array(args) ⇒ Object
Helper method to make a ArgSpec object where the container is an Array. Set :default to a Proc that generates an empty array.
92 93 94 |
# File 'lib/hashmake/hash_makeable.rb', line 92 def arg_spec_array args ArrayArgSpec.new args end |
#arg_spec_hash(args) ⇒ Object
Helper method to make a ArgSpec object where the container is an Hash. Set :default to a Proc that generates an empty hash.
98 99 100 |
# File 'lib/hashmake/hash_makeable.rb', line 98 def arg_spec_hash args HashArgSpec.new args end |