Module: Card::Set::Trait

Included in:
Card::Set
Defined in:
lib/card/set/trait.rb

Overview

ActiveCard support: accessing plus cards as attributes

Instance Method Summary collapse

Instance Method Details

#card_accessor(*args) ⇒ Object



6
7
8
9
# File 'lib/card/set/trait.rb', line 6

def card_accessor *args
  options = args.extract_options!
  add_traits args, options.merge(reader: true, writer: true)
end

#card_reader(*args) ⇒ Object



11
12
13
14
# File 'lib/card/set/trait.rb', line 11

def card_reader *args
  options = args.extract_options!
  add_traits args, options.merge(reader: true)
end

#card_writer(*args) ⇒ Object



16
17
18
19
# File 'lib/card/set/trait.rb', line 16

def card_writer *args
  options = args.extract_options!
  add_traits args, options.merge(writer: true)
end