class Momo::BlockHash
Attributes
props[RW]
Public Class Methods
new(options, &block)
click to toggle source
# File lib/momo/momoscope.rb, line 7 def initialize(options, &block) @options = options @props = {} instance_eval(&block) end
Public Instance Methods
method_missing(name, *args, &block)
click to toggle source
# File lib/momo/momoscope.rb, line 13 def method_missing(name, *args, &block) if /^[[:upper:]]/.match(name) == nil raise "Invalid property name: #{name}" end @props[name] = Momo.resolve(args[0], @options, &block) end