Class: Briskly::Element
- Inherits:
-
Object
- Object
- Briskly::Element
- Defined in:
- lib/briskly/element.rb
Instance Attribute Summary collapse
-
#data ⇒ Object
readonly
Returns the value of attribute data.
-
#keyword(internal = nil) ⇒ Object
readonly
Returns the value of attribute keyword.
Instance Method Summary collapse
-
#initialize(keyword, data = nil) ⇒ Element
constructor
A new instance of Element.
Constructor Details
#initialize(keyword, data = nil) ⇒ Element
Returns a new instance of Element.
9 10 11 12 13 14 |
# File 'lib/briskly/element.rb', line 9 def initialize(keyword, data = nil) raise ArgumentError unless keyword @keyword = Briskly::Keyword.new(keyword) @data = data end |
Instance Attribute Details
#data ⇒ Object (readonly)
Returns the value of attribute data.
6 7 8 |
# File 'lib/briskly/element.rb', line 6 def data @data end |
#keyword(internal = nil) ⇒ Object (readonly)
Returns the value of attribute keyword.
7 8 9 |
# File 'lib/briskly/element.rb', line 7 def keyword @keyword end |