Sha256: 90eb2540ef7da353ff731c321ae7307742664502a7a3aebefad0ab64b2873b88
Contents?: true
Size: 435 Bytes
Versions: 10
Compression:
Stored size: 435 Bytes
Contents
module SirenClient class Field attr_reader :payload, :name, :type, :value, :title def initialize(data) if data.class != Hash raise ArgumentError, "You must pass in a Hash to SirenClient::Action.new" end @payload = data @name = @payload['name'] || '' @type = @payload['type'] || 'text' @value = @payload['value'] || '' @title = @payload['title'] || '' end end end
Version data entries
10 entries across 10 versions & 1 rubygems