Module: Ronin::SQL::Fields

Included in:
Clause, InjectionExpr, StatementList
Defined in:
lib/ronin/sql/fields.rb

Overview

Allows creating Fields via #method_missing.

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(name, *arguments, &block) ⇒ Object (protected)

Allows specifying databases, tables or columns.

Examples:

db.users
users.id


57
58
59
60
61
62
63
# File 'lib/ronin/sql/fields.rb', line 57

def method_missing(name,*arguments,&block)
  if (arguments.empty? && block.nil?)
    Field.new(name)
  else
    super
  end
end

Instance Method Details

#respond_to_missing?(name) ⇒ true

Returns:

  • (true)


36
37
38
# File 'lib/ronin/sql/fields.rb', line 36

def respond_to_missing?(name)
  true
end

#to_arynil

Returns:

  • (nil)


43
44
# File 'lib/ronin/sql/fields.rb', line 43

def to_ary
end