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:



17
18
19
# File 'lib/bindata/dsl.rb', line 17

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

Instance Method Details

#dsl_parser(parser_type = nil) ⇒ Object



9
10
11
12
13
14
15
# File 'lib/bindata/dsl.rb', line 9

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.



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

def to_ary; nil; end

#to_strObject



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

def to_str; nil; end