Class: Rasm::Java::Attribute
- Inherits:
-
Object
- Object
- Rasm::Java::Attribute
- Defined in:
- lib/rasm/java/attributes.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(cp, name, data) ⇒ Attribute
constructor
A new instance of Attribute.
- #value ⇒ Object
Constructor Details
#initialize(cp, name, data) ⇒ Attribute
Returns a new instance of Attribute.
5 6 7 |
# File 'lib/rasm/java/attributes.rb', line 5 def initialize(cp, name, data) @cp, @name, @data = cp, name, data end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
4 5 6 |
# File 'lib/rasm/java/attributes.rb', line 4 def name @name end |
Class Method Details
Instance Method Details
#value ⇒ Object
9 10 11 |
# File 'lib/rasm/java/attributes.rb', line 9 def value @cp[@data.unpack('n')[0]].val end |