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
41
42
43
|
# File 'lib/origami/numeric.rb', line 41
def &(other)
self.class.new(value & other)
end
|
69
70
71
|
# File 'lib/origami/numeric.rb', line 69
def *(other)
self.class.new(value * other)
end
|
#**(other) ⇒ Object
81
82
83
|
# File 'lib/origami/numeric.rb', line 81
def **(other)
self.class.new(value**other)
end
|
57
58
59
|
# File 'lib/origami/numeric.rb', line 57
def +(other)
self.class.new(value + other)
end
|
61
62
63
|
# File 'lib/origami/numeric.rb', line 61
def -(other)
self.class.new(value - other)
end
|
65
66
67
|
# File 'lib/origami/numeric.rb', line 65
def -@
self.class.new(-value)
end
|
73
74
75
|
# File 'lib/origami/numeric.rb', line 73
def /(other)
self.class.new(value / other)
end
|
49
50
51
|
# File 'lib/origami/numeric.rb', line 49
def <<(val)
self.class.new(value << val)
end
|
#>>(other) ⇒ Object
53
54
55
|
# File 'lib/origami/numeric.rb', line 53
def >>(other)
self.class.new(value >> other)
end
|
45
46
47
|
# File 'lib/origami/numeric.rb', line 45
def ^(other)
self.class.new(value ^ other)
end
|
77
78
79
|
# File 'lib/origami/numeric.rb', line 77
def abs
self.class.new(value.abs)
end
|
37
38
39
|
# File 'lib/origami/numeric.rb', line 37
def |(other)
self.class.new(value | other)
end
|
33
34
35
|
# File 'lib/origami/numeric.rb', line 33
def ~
self.class.new(~value)
end
|