Class: CTX::Context

Inherits:
Hash show all
Defined in:
lib/ctx.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name) ⇒ Context

Returns a new instance of Context.



7
# File 'lib/ctx.rb', line 7

def initialize(name) @name = name.sym end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



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

def name
  @name
end

Instance Method Details

#eql?(other) ⇒ Boolean

Returns:



8
# File 'lib/ctx.rb', line 8

def eql?(other) @name.eql?(other.name) end

#hashObject



9
# File 'lib/ctx.rb', line 9

def hash() @name.hash end

#to_sObject



10
# File 'lib/ctx.rb', line 10

def to_s() "#{name} #{super.to_s}" end