Module: BinData::DSLMixin::ClassMethods

Defined in:
lib/bindata/dsl.rb

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(symbol, *args, &block) ⇒ Object

:nodoc:



53
54
55
# File 'lib/bindata/dsl.rb', line 53

def method_missing(symbol, *args, &block) #:nodoc:
  dsl_parser.__send__(symbol, *args, &block)
end

Instance Method Details

#dsl_parser(parser_type = nil) ⇒ Object



45
46
47
48
49
50
51
# File 'lib/bindata/dsl.rb', line 45

def dsl_parser(parser_type = nil)
  unless defined? @dsl_parser
    parser_type = superclass.dsl_parser.parser_type if parser_type.nil?
    @dsl_parser = DSLParser.new(self, parser_type)
  end
  @dsl_parser
end

#to_aryObject

Assert object is not an array or string.



58
# File 'lib/bindata/dsl.rb', line 58

def to_ary; nil; end

#to_strObject



59
# File 'lib/bindata/dsl.rb', line 59

def to_str; nil; end