module Avro::Builder::DslAttributes
This module provides methods for defining attributes that can be set via the DSL
on various objects.
The methods generated for DSL
attributes are combined getter/setters of the form:
attribute(value = nil)
When a value is provided the attribute is set, and when it is nil the current value is returned.
When a DSL
attribute is defined, the class also keeps track of the attribute names.
Public Class Methods
included(base)
click to toggle source
# File lib/avro/builder/dsl_attributes.rb, line 20 def self.included(base) base.extend ClassMethods end
Public Instance Methods
dsl_attribute?(name)
click to toggle source
# File lib/avro/builder/dsl_attributes.rb, line 84 def dsl_attribute?(name) self.class.dsl_attribute_names.include?(name.to_sym) end