Class: Cel::Bytes
- Defined in:
- lib/cel/ast/elements/bytes.rb
Instance Attribute Summary collapse
-
#string ⇒ Object
(also: #to_ruby_type)
readonly
Returns the value of attribute string.
Attributes inherited from Literal
Instance Method Summary collapse
-
#initialize(value) ⇒ Bytes
constructor
A new instance of Bytes.
- #to_ary ⇒ Object
Methods inherited from Literal
Methods included from CelMethods
Constructor Details
#initialize(value) ⇒ Bytes
7 8 9 10 |
# File 'lib/cel/ast/elements/bytes.rb', line 7 def initialize(value) super(:bytes, value) @string = value.pack("C*") end |
Instance Attribute Details
#string ⇒ Object (readonly) Also known as: to_ruby_type
Returns the value of attribute string.
5 6 7 |
# File 'lib/cel/ast/elements/bytes.rb', line 5 def string @string end |
Instance Method Details
#to_ary ⇒ Object
12 13 14 |
# File 'lib/cel/ast/elements/bytes.rb', line 12 def to_ary [self] end |