lib/testable/region.rb
# Allows for a "has_one" method to be declared on a model, like a page
# object to specify that the model has a region associated with it. In
# this case, that would be a single region that can be located by a
# reference to a specific class (which is also a model) and, relative
# to that model, is within some specific means of identification.
# rubocop:disable Naming/PredicateName
Allows for a "has_one" method to be declared on a model, like a page
object to specify that the model has a region associated with it. In
this case, that would be a single region that can be located by a
reference to a specific class (which is also a model) and, relative
to that model, is within some specific means of identification.
Allows for a " has_one " method to be declared on a model like a page object to specify that the model has a region associated with it . In this case that would be a single region that can be located by a reference to a specific class ( which is also a model ) and relative to that model is within some specific means of identification .
def has_one(identifier, **context, &block)
        within = context[:in] || context[:within]
        region_class = context[:class] || context[:region_class]
        define_region_accessor(identifier, within: within, region_class: region_class, &block)
      end
def has_one ( identifier , ** context , & block ) within = context [ :in ] || context [ :within ] region_class = context [ :class ] || context [ :region_class ] define_region_accessor ( identifier , within : within , region_class : region_class , & block ) end
Allows for a "has_one" method to be declared on a model, like a page
object to specify that the model has a region associated with it.
Allows for a " has_one " method to be declared on a model like a page object to specify that the model has a region associated with it .
identifier
<not_specific>
context
<not_specific>
block
<not_specific>