Module: Origami::Number
Overview
Class representing a PDF number (Integer, or Real).
Constant Summary
Constants included
from Object
Object::TOKENS
Instance Attribute Summary
Attributes included from Object
#file_offset, #generation, #no, #objstm_offset, #parent
Instance Method Summary
collapse
Methods included from Object
#cast_to, #copy, #document, #export, included, #indirect?, #indirect_parent, #initialize, #logicalize, #logicalize!, #native_type, #numbered?, parse, #post_build, #pre_build, #reference, #set_document, #set_indirect, skip_until_next_obj, #solve, #to_o, #to_s, #type, typeof, #version_required, #xrefs
Instance Method Details
42
43
44
|
# File 'lib/origami/numeric.rb', line 42
def &(val)
self.class.new(self.value & val)
end
|
70
71
72
|
# File 'lib/origami/numeric.rb', line 70
def *(val)
self.class.new(self.value * val)
end
|
82
83
84
|
# File 'lib/origami/numeric.rb', line 82
def **(val)
self.class.new(self.value ** val)
end
|
58
59
60
|
# File 'lib/origami/numeric.rb', line 58
def +(val)
self.class.new(self.value + val)
end
|
62
63
64
|
# File 'lib/origami/numeric.rb', line 62
def -(val)
self.class.new(self.value - val)
end
|
66
67
68
|
# File 'lib/origami/numeric.rb', line 66
def -@
self.class.new(-self.value)
end
|
74
75
76
|
# File 'lib/origami/numeric.rb', line 74
def /(val)
self.class.new(self.value / val)
end
|
50
51
52
|
# File 'lib/origami/numeric.rb', line 50
def <<(val)
self.class.new(self.value << val)
end
|
54
55
56
|
# File 'lib/origami/numeric.rb', line 54
def >>(val)
self.class.new(self.value >> val)
end
|
46
47
48
|
# File 'lib/origami/numeric.rb', line 46
def ^(val)
self.class.new(self.value ^ val)
end
|
78
79
80
|
# File 'lib/origami/numeric.rb', line 78
def abs
self.class.new(self.value.abs)
end
|
38
39
40
|
# File 'lib/origami/numeric.rb', line 38
def |(val)
self.class.new(self.value | val)
end
|
34
35
36
|
# File 'lib/origami/numeric.rb', line 34
def ~
self.class.new(~self.value)
end
|