Module: InheritableAccessors::InheritableOptionAccessor
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/inheritable_accessors/inheritable_option_accessor.rb
Defined Under Namespace
Modules: ClassMethods Classes: LetOption
Class Method Summary collapse
Class Method Details
.__inheritable_option(context, options_hash, name, value, &block) ⇒ Object
47 48 49 50 51 52 53 54 55 |
# File 'lib/inheritable_accessors/inheritable_option_accessor.rb', line 47 def self.__inheritable_option(context, , name, value, &block) if value [name] = value elsif block_given? [name] = InheritableOptionAccessor::LetOption.new(block) else [name].instance_of?(InheritableOptionAccessor::LetOption) ? [name].with_context(context) : [name] end end |