Class: Symbol

Inherits:
Object show all
Defined in:
lib/other.rb

Instance Method Summary collapse

Instance Method Details

#coerce(a) ⇒ Object

2.6.1 :008 > ii.first.attributes

=> {:zwoebelkuchen=>[7, 9, 9, 7, 8, 8, 3, 6, 9, ":zt:", ":zt:", ":zg:", ":zg:", ":tzu:", ":grotte:"], :created_at=>Wed, 27 Mar 2019 14:59:45 +0000}

2.6.1 :009 > ii.first.send :zwoebelkuchen key zwoebelkuchen iv [7, 9, 9, 7, 8, 8, 3, 6, 9, “:zt:”, “:zt:”, “:zg:”, “:zg:”, “:tzu:”, “:grotte:”] 27.03.(15:00:36)ERROR->MethodMissing -> Undefined method: coerce – Args: [Wed, 27 Mar 2019 14:59:45 +0000] 27.03.(15:00:36)ERROR-> The Message undefined method `coerce' for :zt:Symbol 27.03.(15:00:36)ERROR-> /home/dev/topo/activeorient/lib/support/orient.rb:129:in `block in method_missing'

/home/dev/topo/activeorient/lib/support/orient.rb:129:in `map'
/home/dev/topo/activeorient/lib/support/orient.rb:129:in `method_missing'
/home/ubuntu/.rvm/gems/ruby-2.6.1/gems/activesupport-5.2.2.1/lib/active_support/core_ext/date/calculations.rb:140:in `<=>'
/home/ubuntu/.rvm/gems/ruby-2.6.1/gems/activesupport-5.2.2.1/lib/active_support/core_ext/date/calculations.rb:140:in `compare_with_coercion'
/home/ubuntu/.rvm/gems/ruby-2.6.1/gems/activesupport-5.2.2.1/lib/active_support/core_ext/date_time/calculations.rb:208:in `<=>'
/home/dev/topo/activeorient/lib/support/orient.rb:36:in `=='
/home/dev/topo/activeorient/lib/support/orient.rb:36:in `key'
/home/dev/topo/activeorient/lib/support/orient.rb:36:in `initialize'
/home/dev/topo/activeorient/lib/base.rb:216:in `new'
/home/dev/topo/activeorient/lib/base.rb:216:in `[]'
/home/dev/topo/activeorient/lib/base_properties.rb:110:in `block in define_property_methods'
(irb):9:in `irb_binding'
/home/ubuntu/.rvm/rubies/ruby-2.6.1/lib/ruby/2.6.0/irb/workspace.rb:85:in `eval'
/home/ubuntu/.rvm/rubies/ruby-2.6.1/lib/ruby/2.6.0/irb/workspace.rb:85:in `evaluate'
/home/ubuntu/.rvm/rubies/ruby-2.6.1/lib/ruby/2.6.0/irb/context.rb:385:in `evaluate'
/home/ubuntu/.rvm/rubies/ruby-2.6.1/lib/ruby/2.6.0/irb.rb:493:in `block (2 levels) in eval_input'
/home/ubuntu/.rvm/rubies/ruby-2.6.1/lib/ruby/2.6.0/irb.rb:647:in `signal_status'
/home/ubuntu/.rvm/rubies/ruby-2.6.1/lib/ruby/2.6.0/irb.rb:490:in `block in eval_input'
/home/ubuntu/.rvm/rubies/ruby-2.6.1/lib/ruby/2.6.0/irb/ruby-lex.rb:246:in `block (2 levels) in each_top_level_statement'
/home/ubuntu/.rvm/rubies/ruby-2.6.1/lib/ruby/2.6.0/irb/ruby-lex.rb:232:in `loop'
/home/ubuntu/.rvm/rubies/ruby-2.6.1/lib/ruby/2.6.0/irb/ruby-lex.rb:232:in `block in each_top_level_statement'
/home/ubuntu/.rvm/rubies/ruby-2.6.1/lib/ruby/2.6.0/irb/ruby-lex.rb:231:in `catch'
/home/ubuntu/.rvm/rubies/ruby-2.6.1/lib/ruby/2.6.0/irb/ruby-lex.rb:231:in `each_top_level_statement'
/home/ubuntu/.rvm/rubies/ruby-2.6.1/lib/ruby/2.6.0/irb.rb:489:in `eval_input'
/home/ubuntu/.rvm/rubies/ruby-2.6.1/lib/ruby/2.6.0/irb.rb:428:in `block in run'
/home/ubuntu/.rvm/rubies/ruby-2.6.1/lib/ruby/2.6.0/irb.rb:427:in `catch'
/home/ubuntu/.rvm/rubies/ruby-2.6.1/lib/ruby/2.6.0/irb.rb:427:in `run'
/home/ubuntu/.rvm/rubies/ruby-2.6.1/lib/ruby/2.6.0/irb.rb:383:in `start'
./active-orient-console:51:in `<main>'

94
95
96
# File 'lib/other.rb', line 94

def coerce a  #nodoc#
 nil	
end

#to_aObject


42
43
44
# File 'lib/other.rb', line 42

def to_a
  [ self ]
end

#to_orObject


49
50
51
# File 'lib/other.rb', line 49

def to_or
"'"+self.to_orient+"'"
end

#to_orientObject

symbols are masked with “:symbol:”


46
47
48
# File 'lib/other.rb', line 46

def to_orient
  ":"+self.to_s+":"
end