Included Modules

Class/Module Index [+]

Quicksearch

RGen::Util::PatternMatcher::Bindable

Public Class Methods

new() click to toggle source
# File lib/rgen/util/pattern_matcher.rb, line 101
def initialize
  @bound = false
  @value = nil
  @many = false
end

Public Instance Methods

_bind(value) click to toggle source
# File lib/rgen/util/pattern_matcher.rb, line 112
def _bind(value)
  @value = value
  @bound = true
end
_bound?() click to toggle source
# File lib/rgen/util/pattern_matcher.rb, line 106
def _bound?
  @bound
end
_many?() click to toggle source
# File lib/rgen/util/pattern_matcher.rb, line 109
def _many?
  @many
end
_value() click to toggle source
# File lib/rgen/util/pattern_matcher.rb, line 116
def _value
  @value
end
each() click to toggle source

pretend this is an enumerable which contains itself, so the bindable can be inserted into many-features, when this is done the bindable is marked as a many-bindable

# File lib/rgen/util/pattern_matcher.rb, line 124
def each
  @many = true
  yield(self)
end
method_missing(m, *args) click to toggle source
# File lib/rgen/util/pattern_matcher.rb, line 128
def method_missing(m, *args)
  raise "bindable not bound" unless _bound?
  @value.send(m, *args)
end
to_s() click to toggle source
# File lib/rgen/util/pattern_matcher.rb, line 119
def to_s
  @value.to_s
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.