class Synchronisable::DSL::Macro::Attribute
Expression
for an attribute definition.
@api private
@see Synchronisable::DSL::Macro
@see Synchronisable::DSL::Expression
Public Class Methods
new(options)
click to toggle source
Calls superclass method
# File lib/synchronisable/dsl/macro/attribute.rb, line 13 def initialize(options) @converter = options[:converter] super end
Public Instance Methods
default()
click to toggle source
# File lib/synchronisable/dsl/macro/attribute.rb, line 22 def default transform(@default) end
source()
click to toggle source
# File lib/synchronisable/dsl/macro/attribute.rb, line 18 def source transform(@source) end
Protected Instance Methods
transform(arg)
click to toggle source
Calls superclass method
# File lib/synchronisable/dsl/macro/attribute.rb, line 28 def transform(arg) convert(super) end
Private Instance Methods
convert(arg)
click to toggle source
# File lib/synchronisable/dsl/macro/attribute.rb, line 34 def convert(arg) @converter.try(:call, arg) || arg end