Class: Ree::ErrorDsl::ClassConstant

Inherits:
Object
  • Object
show all
Defined in:
lib/ree/dsl/error_dsl.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name) ⇒ ClassConstant

Returns a new instance of ClassConstant.



17
18
19
20
# File 'lib/ree/dsl/error_dsl.rb', line 17

def initialize(name)
  @name = name
  @message = nil
end

Instance Attribute Details

#messageObject (readonly)

Returns the value of attribute message.



15
16
17
# File 'lib/ree/dsl/error_dsl.rb', line 15

def message
  @message
end

#nameObject (readonly)

Returns the value of attribute name.



15
16
17
# File 'lib/ree/dsl/error_dsl.rb', line 15

def name
  @name
end

Instance Method Details

#[](msg) ⇒ Object



22
23
24
25
# File 'lib/ree/dsl/error_dsl.rb', line 22

def [](msg)
  @message = msg
  self
end