class Hashcraft::Option
Defines a method and corresponding attribute for a craftable class.
Attributes
craft[R]
default[R]
eager[R]
eager?[R]
internal_meta[R]
key[R]
mutator[R]
name[R]
Public Instance Methods
meta(key)
click to toggle source
Options are sent into transformers as arguments. Leverage the meta key for an option to store any additional data that you may need in transformers. This method provides a quick message-based entry point into inspecting the meta key's value.
# File lib/hashcraft/option.rb, line 45 def meta(key) internal_meta[key.to_s.to_sym] end
Private Instance Methods
symbolize_keys(hash)
click to toggle source
# File lib/hashcraft/option.rb, line 61 def symbolize_keys(hash) hash.transform_keys(&:to_sym) end