Class: Browserbeam::InteractiveElement

Inherits:
Struct
  • Object
show all
Defined in:
lib/browserbeam/types.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#labelObject

Returns the value of attribute label

Returns:

  • (Object)

    the current value of label



9
10
11
# File 'lib/browserbeam/types.rb', line 9

def label
  @label
end

#refObject

Returns the value of attribute ref

Returns:

  • (Object)

    the current value of ref



9
10
11
# File 'lib/browserbeam/types.rb', line 9

def ref
  @ref
end

#roleObject

Returns the value of attribute role

Returns:

  • (Object)

    the current value of role



9
10
11
# File 'lib/browserbeam/types.rb', line 9

def role
  @role
end

#tagObject

Returns the value of attribute tag

Returns:

  • (Object)

    the current value of tag



9
10
11
# File 'lib/browserbeam/types.rb', line 9

def tag
  @tag
end

#valueObject

Returns the value of attribute value

Returns:

  • (Object)

    the current value of value



9
10
11
# File 'lib/browserbeam/types.rb', line 9

def value
  @value
end

Class Method Details

.from_hash(data) ⇒ Object



10
11
12
13
14
15
16
17
18
# File 'lib/browserbeam/types.rb', line 10

def self.from_hash(data)
  new(
    ref: data["ref"] || "",
    tag: data["tag"] || "",
    role: data["role"] || "",
    label: data["label"] || "",
    value: data["value"],
  )
end