class Fixturama::Loader::Value
@private Wraps a value with a reference to its key in the [Fixturama::Loader::Context]
Constants
- MATCHER
Regex mather to extract value key from the stringified wrapper
Public Class Methods
new(key, value)
click to toggle source
Calls superclass method
# File lib/fixturama/loader/value.rb 11 def self.new(key, value) 12 case value 13 when String, Symbol, Numeric, TrueClass, FalseClass, NilClass then value 14 else super 15 end 16 end
new(key, value)
click to toggle source
# File lib/fixturama/loader/value.rb 26 def initialize(key, value) 27 @key = key 28 @value = value 29 end
Public Instance Methods
to_s()
click to toggle source
The sting representing the value with a reference to it in bindings
# File lib/fixturama/loader/value.rb 19 def to_s 20 "\"#<Fixturama::Loader::Context[#{@key}]>\"" 21 end
Also aliased as: to_str
Private Instance Methods
method_missing(name, *args, &block)
click to toggle source
Calls superclass method
# File lib/fixturama/loader/value.rb 31 def method_missing(name, *args, &block) 32 @value.respond_to?(name) ? @value.send(name, *args, &block) : super 33 end
respond_to_missing?(name, *)
click to toggle source
Calls superclass method
# File lib/fixturama/loader/value.rb 35 def respond_to_missing?(name, *) 36 @value.respond_to?(name) || super 37 end