class RKit::Override::Pattern

Constants

DEPEND_PATTERN
IF_PATTERN
STANDARD_PATTERN

Attributes

args[RW]
pattern[RW]

Public Class Methods

build(*args) click to toggle source
# File lib/r_kit/override/pattern.rb, line 3
def self.build *args
  new(*args).build
end
new(pattern, *args) click to toggle source
# File lib/r_kit/override/pattern.rb, line 10
def initialize pattern, *args
  @pattern = pattern
  @args = args
end

Public Instance Methods

build() click to toggle source
# File lib/r_kit/override/pattern.rb, line 15
def build
  send "build_from_#{ pattern.class.name.underscore }"
end
build_from_symbol()
Alias for: build_from_string

Protected Instance Methods

build_from_proc() click to toggle source
# File lib/r_kit/override/pattern.rb, line 20
          def build_from_proc
  pattern
end
build_from_string() click to toggle source
# File lib/r_kit/override/pattern.rb, line 24
          def build_from_string
  self.class.const_get("#{ pattern.upcase }_PATTERN").call(*args)
end
Also aliased as: build_from_symbol