class ShafClient::Alps::Extension

Attributes

href[R]
id[R]
value[R]

Public Class Methods

new(id:, href: nil, value: nil) click to toggle source
# File lib/shaf_client/alps/extension.rb, line 6
def initialize(id:, href: nil, value: nil)
  @id = id.to_sym
  @href = href
  @value = value
end

Public Instance Methods

to_h() click to toggle source
# File lib/shaf_client/alps/extension.rb, line 12
def to_h
  {
    id: id,
    href: href,
    value: value,
  }
end

Private Instance Methods

method_missing(method_name, *args, &block) click to toggle source
Calls superclass method
# File lib/shaf_client/alps/extension.rb, line 22
def method_missing(method_name, *args, &block)
  name = method_name.to_s
  return super unless name.end_with? '?'

  id.to_s == name[0..-2]
end
respond_to_missing?(method_name, include_private = false) click to toggle source
Calls superclass method
# File lib/shaf_client/alps/extension.rb, line 29
def respond_to_missing?(method_name, include_private = false)
  return true if method_name.to_s.end_with? '?'
  super
end