Module: Yarel::Base

Defined in:
lib/yarel/base.rb

Defined Under Namespace

Modules: ClassMethods

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#countObject

Returns the value of attribute count.



6
7
8
# File 'lib/yarel/base.rb', line 6

def count
  @count
end

Class Method Details

.included(klass) ⇒ Object



25
26
27
28
29
30
31
32
33
34
# File 'lib/yarel/base.rb', line 25

def self.included(klass)
  klass.cattr_accessor :table
  klass.table = Table.new(klass.name.underscore.gsub("/", "."), klass)
  klass.instance_eval do
    class << self
      delegate :to_yql, :to => :table
    end
  end
  klass.extend ClassMethods
end