Class: Briskly::Element

Inherits:
Object
  • Object
show all
Defined in:
lib/briskly/element.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(keyword, data = nil) ⇒ Element

Returns a new instance of Element.

Raises:

  • (ArgumentError)


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

#dataObject (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