Class: Code::Object

Inherits:
Object
  • Object
show all
Defined in:
lib/code/object.rb,
lib/code/object/list.rb,
lib/code/object/string.rb,
lib/code/object/boolean.rb,
lib/code/object/decimal.rb,
lib/code/object/integer.rb,
lib/code/object/nothing.rb,
lib/code/object/dictionnary.rb

Direct Known Subclasses

Boolean, Decimal, Dictionnary, Integer, List, Nothing, String

Defined Under Namespace

Classes: Boolean, Decimal, Dictionnary, Integer, List, Nothing, String

Instance Method Summary collapse

Instance Method Details

#fetch(_key, default = ::Code::Object::Nothing.new) ⇒ Object



3
4
5
# File 'lib/code/object.rb', line 3

def fetch(_key, default = ::Code::Object::Nothing.new)
  default
end

#to_sObject

Raises:

  • (NotImplementedError)


7
8
9
# File 'lib/code/object.rb', line 7

def to_s
  raise NotImplementedError
end